Q
- The unit Quantity type.E
- The unit parameter sub-type.public abstract class UnitParameter<Q extends Quantity,E extends UnitParameter> extends DataParam implements javolution.lang.ValueType
Modified by: Joseph A. Huwaldt
RESOURCES
Modifier and Type | Method and Description |
---|---|
abstract <R extends Quantity> |
changeTo(Unit<R> unit)
Returns the parameter that has the same values as this parameter but with the units
changed (without converting the values).
|
boolean |
equals(java.lang.Object obj)
Compares the specified object with this parameter for strict equality same value,
same units, same name, same user data.
|
Unit<Q> |
getUnit()
Returns the unit in which the value is stated.
|
int |
hashCode()
Returns the hash code for this
UnitParameter . |
abstract E |
to(Unit<Q> unit)
Returns the parameter equivalent to this parameter but stated in the specified
unit.
|
compareTo, getName, getUserObject, setName, setUserObject, toString, toText
public Unit<Q> getUnit()
public abstract E to(Unit<Q> unit) throws ConversionException
unit
- the unit of the parameter to be returned.ConversionException
- if the current model does not allows for conversion to
the specified unit.public abstract <R extends Quantity> E changeTo(Unit<R> unit) throws ConversionException
R
- The unit of measure type (or Quantity) for the input units.unit
- the unit of the parameter to be returned.ConversionException
- if the current model does not allows for conversion to
the specified unit.public boolean equals(java.lang.Object obj)