de.grogra.util
Class Quantity
java.lang.Object
de.grogra.util.Quantity
public final class Quantity
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
ANGLE
public static final Quantity ANGLE
FRACTION
public static final Quantity FRACTION
LENGTH
public static final Quantity LENGTH
MASS
public static final Quantity MASS
POWER
public static final Quantity POWER
POWER_PER_AREA
public static final Quantity POWER_PER_AREA
TEMPERATURE
public static final Quantity TEMPERATURE
TIME
public static final Quantity TIME
add
public void add(java.lang.String unit,
double factor)
add
public void add(Unit unit)
chooseUnit
public Unit chooseUnit(float value)
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
get
public static Quantity get(java.lang.String name)
getPreferredUnit
public Unit getPreferredUnit()
getUnits
public Unit[] getUnits()
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
newInstance
public Quantity newInstance(Unit preferredUnit)
parseUnit
public Unit parseUnit(java.lang.String s)
parseUnit
public Unit parseUnit(java.lang.String s,
Unit defaultUnit)
toString
public java.lang.String toString(double value)
toString
public java.lang.String toString(float value)