Interface Formatter

    • Field Detail

      • VARIABLE_SCALE

        static final int VARIABLE_SCALE
        Value used when setting a number format with a custom scale, indicating that the scale is variable. For example, 1 is formatted as 1.0, 1.1 as 1.1, 1.123 as 1.123, etc.
        See Also:
        Constant Field Values
    • Method Detail

      • format

        String format​(BigDecimal number,
                      int scale)
        Formats a number with the given scale
      • format

        String format​(HasDisplay hasDisplay)
        Formats the given object as the display value
      • format

        String format​(HasMessageKey objectWithKey)
        Formats an object that has a mapping to the translation message key.
      • format

        String format​(IDate date)
        Formats a date as date and time
      • format

        String format​(IDecimalRange range,
                      int scale)
        Formats a decimal range with the given scale
      • format

        String format​(ILatLong latLong)
        Formats a geographical coordinate
      • format

        String format​(Integer number)
        Formats an integer number
      • format

        String format​(Long number)
        Formats a long number
      • format

        String format​(Object object)
        Tests the object type, invoking one of the specific format methods
      • format

        String format​(Range<?> range)
        Formats a range
      • formatAsDate

        String formatAsDate​(IDate dateTime)
        Formats an IDate as date
      • formatAsTime

        String formatAsTime​(IDate dateTime)
        Formats an IDate as time
      • formatAsTimestamp

        String formatAsTimestamp​(IDate dateTime)
        Formats an IDate as timestamp including the seconds an milliseconds
      • formatDuration

        String formatDuration​(Long duration)
        Formats a duration (given in milliseconds) in a string like: 1h 12m 31s
      • formatId

        String formatId​(IEntity entity)
        Formats the entity identifier
      • formatPercentage

        String formatPercentage​(BigDecimal number)
        Formats a percentage with variable scale
      • formatPercentage

        String formatPercentage​(BigDecimal number,
                                int scale)
        Formats a percentage with the given decimal fields
      • formatPercentage

        String formatPercentage​(Double number)
        Formats a percentage with variable scale
      • formatPercentage

        String formatPercentage​(Double number,
                                int scale)
        Formats a percentage with the given decimal digits
      • formatPercentage

        String formatPercentage​(Integer value,
                                Integer total)
        Formats a percentage without decimal fields
      • formatPercentage

        String formatPercentage​(Integer value,
                                Integer total,
                                int scale)
        Formats a percentage with the given decimal digits
      • formatRelated

        String formatRelated​(AccountVO account)
        Formats the account as related to be shown in the result list Used in archived-account-history.html
      • getDatePattern

        String getDatePattern()
        Returns the date pattern
      • getTimePattern

        String getTimePattern()
        Returns the time pattern