Class TypedQuantity<U extends Unit<U>,T extends AbstractScalar<U,T>,K extends DoubleMatrixInterface<U,?,?,?>>
java.lang.Object
org.opentrafficsim.core.egtf.Quantity<T,K>
org.opentrafficsim.core.egtf.typed.TypedQuantity<U,T,K>
- Type Parameters:
U- unit of dataT- data typeK- grid output format
public class TypedQuantity<U extends Unit<U>,T extends AbstractScalar<U,T>,K extends DoubleMatrixInterface<U,?,?,?>> extends Quantity<T,K>
Quantities for a strongly-typed context.
Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Version:
- $Revision$, $LastChangedDate$, by $Author$, initial version 24 okt. 2018
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
Field Summary
Fields Modifier and Type Field Description static Quantity<LinearDensity,LinearDensityMatrix>DENSITYStandard quantity for density.static Quantity<Frequency,FrequencyMatrix>FLOWStandard quantity for flow.static Quantity<Speed,SpeedMatrix>SPEEDStandard quantity for speed. -
Constructor Summary
Constructors Modifier Constructor Description protectedTypedQuantity(String name, boolean speed, Converter<K> converter)Constructor.TypedQuantity(String name, Converter<K> converter)Constructor. -
Method Summary
-
Field Details
-
Constructor Details
-
TypedQuantity
Constructor.- Parameters:
name- String; nameconverter- Converter<K>; converter for output format
-
TypedQuantity
Constructor. Private so only the default SPEED quantity is speed.- Parameters:
name- String; namespeed- boolean; whether this quantity is speedconverter- Converter<K>; converter for output format
-
-
Method Details
-
toString
- Overrides:
toStringin classQuantity<T extends AbstractScalar<U,T>,K extends DoubleMatrixInterface<U,?,?,?>>
-