Interface IPrefix<P extends IPrefix<P>>

All Known Implementing Classes:
BinaryPrefix, DecimalPrefix

public interface IPrefix<P extends IPrefix<P>>
  • 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

      StringBuilder asExponentialStringBuilder(boolean multiplicationSign)
    • scaleFactor

      ScaleFactor scaleFactor()
    • valueFactorTo

      ScaleFactor valueFactorTo(P targetPrefix)
    • createUnitSelector

      LinearKindOfQuantity.LinearUnitSelector createUnitSelector(LinearKindOfQuantity kindOfQuantity, Iterable<P> prefixes)