Package org.orekit.utils
Interface Formatter
-
- All Known Implementing Classes:
AccurateFormatter,TruncatedCcsdsFormatter
public interface FormatterFormatter 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 StringDATE_FORMATString format used for dates.static LocaleSTANDARDIZED_LOCALEStandardized locale to use, to ensure files can be exchanged without internationalization issues.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description StringtoString(double value)Format a double number.StringtoString(int year, int month, int day, int hour, int minute, double seconds)Format a date.default StringtoString(DateTimeComponents dt)Format date time components to make use of attosecond accuracy fromTimeOffset.
-
-
-
Field Detail
-
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:
- Constant Field Values
-
-
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 formattedmonth- of date to be formattedday- of month to be formattedhour- to be formattedminute- to be formattedseconds- and sub-seconds to be formatted- Returns:
- date formatted to match the following format [yyyy-MM-ddTHH:mm:ss.S#]
-
toString
default String toString(DateTimeComponents dt)
Format date time components to make use of attosecond accuracy fromTimeOffset. Does not check if date time is real or if it will meet formating requirements.- Parameters:
dt- date time components to be formatted- Returns:
- date formatted to match the following format [yyyy-MM-ddTHH:mm:ss.S#]
- Since:
- 13.1.6
-
-