Class TimeFormatter

    • Constructor Detail

      • TimeFormatter

        public TimeFormatter()
        Constructs a time formatter that uses the default locale and timezone.
    • Method Detail

      • withLocale

        public TimeFormatter withLocale​(Locale locale)
        Sets the locale to use for formatting the time.
        Parameters:
        locale - locale to use for formatting
        Returns:
        self, for chaining
      • withZone

        public TimeFormatter withZone​(ZoneId zone)
        Sets the time zone to use for formatting the time.
        Parameters:
        zone - time zone to use
        Returns:
        self, for chaining
      • nonNullFormat

        protected String nonNullFormat​(Object value)
        Description copied from class: AbstractCellFormatter
        Formats the specified value into a string appropriate for displaying in a table cell. Note that value is guaranteed to be non-null.
        Specified by:
        nonNullFormat in class AbstractCellFormatter
        Parameters:
        value - the value
        Returns:
        the formatted string