com.azalient.apo.basics
Class Speed
java.lang.Object
com.azalient.apo.basics.Speed
- Direct Known Subclasses:
- Speed.SpeedFinal
public class Speed
- extends Object
A speed value, converted on demand to preferred units (km/h, mph, m/s).
MPH_TO_MPS
public static final double MPH_TO_MPS
- See Also:
- Constant Field Values
MPH_TO_KPH
public static final double MPH_TO_KPH
- See Also:
- Constant Field Values
MPH_TO_FPS
public static final double MPH_TO_FPS
- See Also:
- Constant Field Values
MPS_TO_MPH
public static final double MPS_TO_MPH
- See Also:
- Constant Field Values
MPS_TO_KPH
public static final double MPS_TO_KPH
- See Also:
- Constant Field Values
MPS_TO_FPS
public static final double MPS_TO_FPS
- See Also:
- Constant Field Values
KPH_TO_MPS
public static final double KPH_TO_MPS
- See Also:
- Constant Field Values
KPH_TO_MPH
public static final double KPH_TO_MPH
- See Also:
- Constant Field Values
KPH_TO_FPS
public static final double KPH_TO_FPS
- See Also:
- Constant Field Values
FPS_TO_MPS
public static final double FPS_TO_MPS
- See Also:
- Constant Field Values
FPS_TO_MPH
public static final double FPS_TO_MPH
- See Also:
- Constant Field Values
FPS_TO_KPH
public static final double FPS_TO_KPH
- See Also:
- Constant Field Values
MPS
public static final Speed.S_Units MPS
MPH
public static final Speed.S_Units MPH
KPH
public static final Speed.S_Units KPH
Km_H
public static final Speed.S_Units Km_H
- Kilometres / Hour
M_S
public static final Speed.S_Units M_S
- Metres / Second
ZERO
public static final Speed ZERO
ONE
public static final Speed ONE
Speed
public Speed(Speed.S_Units u,
double s)
Speed
public Speed(double s,
Speed.S_Units u)
Speed
public Speed(double s)
- Create a new speed of (s localeUnits)
Speed
public Speed(Speed s)
defaultSpeedLimit
public static Speed defaultSpeedLimit()
set
public final void set(double s)
set
public final void set(Speed s)
set
public final void set(Speed.S_Units u,
double s)
set
public final void set(double s,
Speed.S_Units u)
get
public final double get(Speed.S_Units u)
get
public final double get()
- Return the speed in the current locale units
kph
public final double kph()
mph
public final double mph()
mps
public final double mps()
localeUnits
public static Speed.S_Units localeUnits()
toString
public final String toString()
- Overrides:
toString in class Object
toString
public final String toString(Speed.S_Units u)
toStringNoUnits
public String toStringNoUnits()
toStringNoUnits
public String toStringNoUnits(Speed.S_Units u)
parse
public static Speed parse(String s)