Package org.opentrafficsim.draw.egtf
Class Quantity<T extends Number,K>
java.lang.Object
org.opentrafficsim.draw.egtf.Quantity<T,K>
- Type Parameters:
T- data typeK- grid output format
- Direct Known Subclasses:
TypedQuantity
Defines a quantity that data sources can provide, such as speed, flow, etc.
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:
- Wouter Schakel
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) final Kconvert(double[][] data) Converts the filtered data to an output format.booleanfinal StringgetName()Returns the name.inthashCode()(package private) final booleanisSpeed()Returns whether this quantity is speed.static Quantity<?,double[][]> Returns a quantity withdouble[][]containing SI values as output format.toString()
-
Field Details
-
SPEED_SI
Standard quantity for speed. -
FLOW_SI
Standard quantity for flow. -
DENSITY_SI
Standard quantity for density.
-
-
Constructor Details
-
Quantity
Constructor.- Parameters:
name- nameconverter- converter for output format
-
Quantity
Constructor. Protected so only the default SPEED_SI quantity is speed.- Parameters:
name- namespeed- whether this quantity is speedconverter- converter for output format
-
-
Method Details
-
si
Returns a quantity withdouble[][]containing SI values as output format.- Parameters:
name- name- Returns:
- quantity with
double[][]containing SI values as output format
-
getName
Returns the name.- Returns:
- name
-
isSpeed
final boolean isSpeed()Returns whether this quantity is speed.- Returns:
- whether this quantity is speed
-
convert
Converts the filtered data to an output format.- Parameters:
data- filtered data- Returns:
- output data
-
hashCode
public int hashCode() -
equals
-
toString
-