Package org.opentrafficsim.draw.graphs
Enum Class FundamentalDiagram.Quantity
java.lang.Object
java.lang.Enum<FundamentalDiagram.Quantity>
org.opentrafficsim.draw.graphs.FundamentalDiagram.Quantity
- All Implemented Interfaces:
Serializable
,Comparable<FundamentalDiagram.Quantity>
,Constable
- Enclosing class:
- FundamentalDiagram
Quantity enum defining density, flow and speed.
Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract double
computeOther
(FundamentalDiagram.Quantity pairing, double thisValue, double pairedValue) Compute the value of the 3rd quantity.abstract String
format
(double value) Formats a value for status display.abstract double
getValue
(FundamentalDiagram.FdSource src, int series, int item) Get scaled value in presentation unit.abstract String
label()
Returns an axis label of the quantity.static FundamentalDiagram.Quantity
Returns the enum constant of this class with the specified name.static FundamentalDiagram.Quantity[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DENSITY
Density. -
FLOW
Flow. -
SPEED
Speed.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
label
Returns an axis label of the quantity.- Returns:
- String; axis label of the quantity
-
format
Formats a value for status display.- Parameters:
value
- double; value- Returns:
- String; formatted string including quantity
-
getValue
Get scaled value in presentation unit.- Parameters:
src
- FdSource; the data sourceseries
- int; series numberitem
- int; item number in series- Returns:
- double; scaled value in presentation unit
-
computeOther
public abstract double computeOther(FundamentalDiagram.Quantity pairing, double thisValue, double pairedValue) Compute the value of the 3rd quantity.- Parameters:
pairing
- Quantity; quantity on other axisthisValue
- double; value of this quantitypairedValue
- double; value of the paired quantity on the other axis- Returns:
- double; value of the 3rd quantity
-