Package org.orekit.utils
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 String
DATE_FORMAT
String format used for dates.static Locale
STANDARDIZED_LOCALE
Standardized locale to use, to ensure files can be exchanged without internationalization issues.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
toString(double value)
Format a double number.String
toString(int year, int month, int day, int hour, int minute, double seconds)
Format a date.
-
-
-
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#]
-
-