Package org.openjdk.jmc.common.unit
Interface IPrefix<P extends IPrefix<P>>
-
- All Known Implementing Classes:
BinaryPrefix,DecimalPrefix
public interface IPrefix<P extends IPrefix<P>>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringaltSymbol()An alternative symbol.StringBuilderasExponentialStringBuilder(boolean multiplicationSign)LinearKindOfQuantity.LinearUnitSelectorcreateUnitSelector(LinearKindOfQuantity kindOfQuantity, Iterable<P> prefixes)Stringidentifier()StringlocalizedName()ScaleFactorscaleFactor()Stringsymbol()ScaleFactorvalueFactorTo(P targetPrefix)
-
-
-
Method Detail
-
identifier
String identifier()
- Returns:
- identifier usable for constructing persistable identifiers for units.
-
symbol
String symbol()
- Returns:
- the symbol normally used to present this prefix in a GUI.
-
altSymbol
String altSymbol()
An alternative symbol. Intended to be used for interactive parsing where entering the micron character may be cumbersome, or catching typing of MB when intending MiB. (These are very different cases, and should ideally not be handled by the same mechanism. However, a single mechanism seems to work right now.)- Returns:
- alternative symbol, or
nullif no other representation is available
-
localizedName
String localizedName()
-
asExponentialStringBuilder
StringBuilder asExponentialStringBuilder(boolean multiplicationSign)
-
scaleFactor
ScaleFactor scaleFactor()
-
valueFactorTo
ScaleFactor valueFactorTo(P targetPrefix)
-
createUnitSelector
LinearKindOfQuantity.LinearUnitSelector createUnitSelector(LinearKindOfQuantity kindOfQuantity, Iterable<P> prefixes)
-
-