Interface IDisplayable

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String AUTO
      Identifier for formatters suitable when many items are typically shown, such as tables, overviews, etc.
      static java.lang.String EXACT
      Identifier for formatters which shows the value with maximum known precision, but still only as one value.
      static java.lang.String VERBOSE
      Identifier for formatters suitable for tool tips.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String displayUsing​(java.lang.String formatHint)
      Format this object for display purposes, preferably using the formatter hinted by formatHint.
    • Field Detail

      • AUTO

        static final java.lang.String AUTO
        Identifier for formatters suitable when many items are typically shown, such as tables, overviews, etc. Relatively compact, but not overly so. Using reasonable precision for at-a-glance display. Such a formatter is expected to exist for all IDisplayable implementations.
        See Also:
        Constant Field Values
      • EXACT

        static final java.lang.String EXACT
        Identifier for formatters which shows the value with maximum known precision, but still only as one value. For quantities, this will often be similar to IQuantity.interactiveFormat(), but tweaked for display, such as using non-breaking space between number and unit, and in applicable locales, between number groups. Also, not always parsable constructs like custom units may be used.
        See Also:
        Constant Field Values
      • VERBOSE

        static final java.lang.String VERBOSE
        Identifier for formatters suitable for tool tips. For quantities, in addition to showing the exact value, like EXACT, the value may additionally be displayed in different units.
        See Also:
        Constant Field Values
    • Method Detail

      • displayUsing

        java.lang.String displayUsing​(java.lang.String formatHint)
        Format this object for display purposes, preferably using the formatter hinted by formatHint. If no such formatter is defined for this type, the default formatter will be used.
        Parameters:
        formatHint - the format hint
        Returns:
        a formatted string according to the hinted (or default) formatter