public final class MPXJFormats extends Object
Constructor and Description |
---|
MPXJFormats(Locale locale,
String nullText,
ProjectFile file)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
NumberFormat |
getCurrencyFormat()
Retrieve the currency format.
|
NumberFormat |
getDecimalFormat()
Retrieve the decimal format.
|
NumberFormat |
getDurationDecimalFormat()
Retrieve the duration decimal format.
|
String |
getNullText()
Retrieve the text representing a null value.
|
NumberFormat |
getPercentageDecimalFormat()
Retrieve the percentage decimal format.
|
NumberFormat |
getUnitsDecimalFormat()
Retrieve the units decimal format.
|
LocalDateTime |
parseDate(String value)
Use the configured format to parse a date value.
|
LocalDateTime |
parseDateTime(String value)
Use the configured format to parse a timestamp value.
|
LocalTime |
parseTime(String value)
Use the configured format to parse a time value.
|
String |
printDate(LocalDate value)
Use the configured format to print a date value.
|
String |
printDateTime(TemporalAccessor value)
Use the configured format to print a timestamp value.
|
String |
printTime(LocalTime value)
Use the configured format to print a time value.
|
void |
update()
Called to update the cached formats when something changes.
|
public MPXJFormats(Locale locale, String nullText, ProjectFile file)
locale
- target localenullText
- locale specific text to represent a value which has not been set, normally "NA"file
- parent filepublic void update()
public NumberFormat getUnitsDecimalFormat()
public NumberFormat getDecimalFormat()
public NumberFormat getCurrencyFormat()
public NumberFormat getDurationDecimalFormat()
public NumberFormat getPercentageDecimalFormat()
public LocalTime parseTime(String value)
value
- time valuepublic String printTime(LocalTime value)
value
- LocalTime instancepublic LocalDateTime parseDate(String value)
value
- date valuepublic String printDate(LocalDate value)
value
- LocalDate instancepublic LocalDateTime parseDateTime(String value)
value
- timestamp valuepublic String printDateTime(TemporalAccessor value)
value
- temporal valuepublic String getNullText()
Copyright © 2000–2024 Packwood Software. All rights reserved.