Class TemporalContext<T extends Temporal>
java.lang.Object
org.ojalgo.type.context.TemporalContext<T>
- All Implemented Interfaces:
TypeContext<T>
An implementation of
TypeContext that is implemented in terms of DateTimeFormatter and
TemporalAdjuster.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionWill force the object to conform to the context's specification.static <T extends Temporal>
TemporalContext<T> of(DateTimeFormatter formatter) static <T extends Temporal>
TemporalContext<T> of(DateTimeFormatter formatter, TemporalAdjuster adjuster) parse(CharSequence text) withAdjuster(TemporalAdjuster adjuster) withFormatter(DateTimeFormatter formatter)
-
Field Details
-
myAdjuster
-
myFormatter
-
-
Constructor Details
-
TemporalContext
TemporalContext(DateTimeFormatter formatter, TemporalAdjuster adjuster)
-
-
Method Details
-
of
-
of
public static <T extends Temporal> TemporalContext<T> of(DateTimeFormatter formatter, TemporalAdjuster adjuster) -
enforce
Description copied from interface:TypeContextWill force the object to conform to the context's specification. The default implementation formats aStringand then parses that back to an object (of the original type).- Specified by:
enforcein interfaceTypeContext<T extends Temporal>
-
format
-
parse
- Specified by:
parsein interfaceTypeContext<T extends Temporal>
-
withAdjuster
-
withFormatter
-