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
Modifier and TypeMethodDescriptionAn alternative symbol.asExponentialStringBuilder
(boolean multiplicationSign) createUnitSelector
(LinearKindOfQuantity kindOfQuantity, Iterable<P> prefixes) symbol()
valueFactorTo
(P targetPrefix)
-
Method Details
-
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
null
if no other representation is available
-
localizedName
String localizedName() -
asExponentialStringBuilder
-
scaleFactor
ScaleFactor scaleFactor() -
valueFactorTo
-
createUnitSelector
LinearKindOfQuantity.LinearUnitSelector createUnitSelector(LinearKindOfQuantity kindOfQuantity, Iterable<P> prefixes)
-