Interface Formatter

  • All Known Implementing Classes:
    AccurateFormatter, TruncatedCcsdsFormatter

    public interface Formatter
    Formatter used to produce strings from data.

    Interface for formatters to be passed to generators, dictating how to write doubles and datetime.

    Since:
    13.0
    Author:
    John Ajamian
    • Field Detail

      • STANDARDIZED_LOCALE

        static final Locale STANDARDIZED_LOCALE
        Standardized locale to use, to ensure files can be exchanged without internationalization issues.
    • Method Detail

      • toString

        String toString​(double value)
        Format a double number.
        Parameters:
        value - number to format
        Returns:
        number formatted.
      • toString

        String toString​(int year,
                        int month,
                        int day,
                        int hour,
                        int minute,
                        double seconds)
        Format a date. Does not check if date time is real or if it will meet formating requirements.
        Parameters:
        year - of date to be formatted
        month - of date to be formatted
        day - of month to be formatted
        hour - to be formatted
        minute - to be formatted
        seconds - and sub-seconds to be formatted
        Returns:
        date formatted to match the following format [yyyy-MM-ddTHH:mm:ss.S#]