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 Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    String format used for dates.
    static final Locale
    Standardized locale to use, to ensure files can be exchanged without internationalization issues.
  • Method Summary

    Modifier and Type
    Method
    Description
    toString(double value)
    Format a double number.
    toString(int year, int month, int day, int hour, int minute, double seconds)
    Format a date.
  • Field Details

    • STANDARDIZED_LOCALE

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

      static final String DATE_FORMAT
      String format used for dates.
      See Also:
  • Method Details

    • 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#]