U
- the Unit of the value(s) in this AbstractValue. Used for setting, getting and displaying the value(s)public abstract class AbstractValue<U extends Unit<U>> extends Object implements Value<U>, Serializable
This file was generated by the OpenTrafficSim value classes generator, 26 jun, 2015
Copyright (c) 2014 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Modifier | Constructor and Description |
---|---|
protected |
AbstractValue(U unit)
Construct a new AbstractValue.
|
Modifier and Type | Method and Description |
---|---|
double |
expressAsSIUnit(double value)
Convert a value to the standard SI unit.
|
protected double |
expressAsSpecifiedUnit(double value)
Convert a value in SI standard unit into the unit of this AbstractValue.
|
U |
getUnit()
Retrieve the unit of this Value.
|
boolean |
isAbsolute()
Indicate whether this is an Absolute Value.
|
boolean |
isRelative()
Indicate whether this is a Relative Value.
|
protected AbstractValue(U unit)
unit
- U; the unit of the new AbstractValuepublic final U getUnit()
public final double expressAsSIUnit(double value)
expressAsSIUnit
in interface Value<U extends Unit<U>>
value
- double; the value to convert to the standard SI unitprotected final double expressAsSpecifiedUnit(double value)
value
- double; the value in the standard SI unitpublic final boolean isAbsolute()
isAbsolute
in interface Value<U extends Unit<U>>
public final boolean isRelative()
isRelative
in interface Value<U extends Unit<U>>
Copyright © 2014–2015 Delft University of Technology. All rights reserved.