public final class DateContext extends Object
TypeContext deals with the old Date. There is another implementation that
tries to deal with the newer date time API – TemporalContext.| Modifier and Type | Field and Description |
|---|---|
static boolean |
NBSP
Use 'Non-Breaking SPace' character instead of ardinary 'space' character.
|
| Constructor and Description |
|---|
DateContext() |
DateContext(DatePart part) |
DateContext(DatePart part,
DateStyle style,
Locale locale) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
configureFormat(Format format,
Object object) |
Date |
enforce(Date object)
Will force the object to conform to the context's specification.
|
String |
format(Object object) |
F |
getFormat() |
DatePart |
getPart() |
DateStyle |
getStyle() |
CalendarDateUnit |
getUnit() |
protected String |
handleFormatException(Format format,
Object object) |
protected Date |
handleParseException(Format format,
String string) |
TypeContext<Date> |
newFormat(DatePart part,
DateStyle style,
Locale locale) |
<G> TypeContext<G> |
newFormat(F format) |
T |
parse(CharSequence string) |
static Format |
toFormat(DatePart part,
DateStyle style,
Locale locale) |
public static final boolean NBSP
public DateContext()
public DateContext(DatePart part)
public Date enforce(Date object)
TypeContextpublic DatePart getPart()
public DateStyle getStyle()
public CalendarDateUnit getUnit()
public TypeContext<Date> newFormat(DatePart part, DateStyle style, Locale locale)
public final String format(Object object)
format in interface TypeContext<T>TypeContext.format(java.lang.Object)public final F getFormat()
public final <G> TypeContext<G> newFormat(F format)
public final T parse(CharSequence string)
parse in interface TypeContext<T>org.ojalgo.type.context.TypeContext#parse(java.lang.String)Copyright © 2018 Optimatika. All rights reserved.