public abstract class ERXDateTimeFormatter extends Format
DateTimeFormatter
into something
that extends Format
so you can safely use it with components that
would expect old formatter types.Format.Field
Constructor and Description |
---|
ERXDateTimeFormatter(DateTimeFormatter formatter,
TemporalQuery<?> query)
Basic constructor.
|
ERXDateTimeFormatter(DateTimeFormatter formatter,
TemporalQuery<?> query,
String pattern)
Constructor that takes an additional string pattern.
|
Modifier and Type | Method and Description |
---|---|
StringBuffer |
format(Object obj,
StringBuffer toAppendTo,
FieldPosition pos) |
DateTimeFormatter |
formatter()
The formatter to be used.
|
Object |
parseObject(String source,
ParsePosition pos) |
String |
pattern()
The pattern used for the formatter.
|
protected TemporalQuery<?> |
query()
The method reference that will create the correct object type from parsed
result.
|
String |
toString() |
clone, format, formatToCharacterIterator, parseObject
public ERXDateTimeFormatter(DateTimeFormatter formatter, TemporalQuery<?> query)
formatter
- the formatter to encapsulatequery
- the method to extract correct date object from parsed resultspublic ERXDateTimeFormatter(DateTimeFormatter formatter, TemporalQuery<?> query, String pattern)
formatter
- the formatter to encapsulatequery
- the method to extract correct date object from parsed resultspattern
- the pattern used by the formatterpublic StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos)
public Object parseObject(String source, ParsePosition pos)
parseObject
in class Format
public DateTimeFormatter formatter()
protected TemporalQuery<?> query()
public String pattern()
Copyright © 2002 – 2020 Project Wonder.