Package org.ka2ddo.util
Interface UnitEnumHasShortUnit<T>
- All Superinterfaces:
UnitEnum<T>
- All Known Implementing Classes:
DistanceUnit
This interface specifies a Enum for units that has a smaller version of the unit in the same system
of units (standard/imperial vs. metric).
- Author:
- Andrew Pavlin, KA2DDO
-
Method Summary
Modifier and TypeMethodDescriptionint
getDepth()
Get depth index for this unit instance's hierarchy of different-sized units.<T extends UnitEnumHasShortUnit<T>>
TGet the shorter unit associated with this unit.
-
Method Details
-
getShortUnit
Get the shorter unit associated with this unit.- Type Parameters:
T
- Enum subclass implementing this interface- Returns:
- shorter unit in same system of measurement
-
getDepth
int getDepth()Get depth index for this unit instance's hierarchy of different-sized units.- Returns:
- zero-based index of how many times you can get a shorter unit before you reach the smallest unit
-