Package overit.geocall.util.measure
Class Measure
java.lang.Object
overit.geocall.util.measure.Measure
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
Distances,Temperatures,Weights
Abstract class that defines an unit of measurement and its information.
A unit of measurement is characterized by an abbreviation symbol and by the class in which its conversion functions, from/to other units of measurement, are implemented.
A unit of measurement is characterized by an abbreviation symbol and by the class in which its conversion functions, from/to other units of measurement, are implemented.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MeasureGets theMeasureobject associated with the unit's symbol string passed as parameter.
For example, for the "km" symbol it will be retieve theDistances.KILOMETERSobject.abstract StringgetAlias()Gets the alias name of the unit of measurementabstract BaseConverterGets the class in which the conversion functions, from/to other units of measurement, are implemented.abstract StringGets the symbol associated to the unit measurement.
For example, kilometers have the "km" symbol, miles have the "mi" symbol and so on.protected final voidregister()
-
Constructor Details
-
Measure
public Measure()
-
-
Method Details
-
register
protected final void register() -
get
Gets theMeasureobject associated with the unit's symbol string passed as parameter.
For example, for the "km" symbol it will be retieve theDistances.KILOMETERSobject.- Parameters:
s- The string symbol of an unit of measurement- Returns:
- The
Measureobject associated with the drive symbol string passed as a parameter if it exists, null otherwise.
-
getSymbol
Gets the symbol associated to the unit measurement.
For example, kilometers have the "km" symbol, miles have the "mi" symbol and so on.- Returns:
- The symbol associated to the unit measurement.
-
getConverterClass
Gets the class in which the conversion functions, from/to other units of measurement, are implemented.- Returns:
- The class in which the conversion functions, from/to other units of measurement, are implemented.
-
getAlias
Gets the alias name of the unit of measurement- Returns:
- The alias name of the unit of measurement
-