Package org.ojalgo.type.context
Interface TypeContext<T>
- All Known Implementing Classes:
BinaryContext
,BooleanContext
,DateContext
,FormatContext
,GenericContext
,NumberContext
,StringContext
,TemporalContext
public interface TypeContext<T>
A type context provides two basic services:
- It enforces some sort of rule/limit regarding size, accuracy or similar. This feature is for instance useful when writing data to a database where attributes are often very specifically typed. "enforcing" is typically a one-way operation that cannot be undone.
- It translates back and forth between some specific type and String - essentially a formatter.
-
Method Summary
-
Method Details
-
enforce
Will force the object to conform to the context's specification. The default implementation formats aString
and then parses that back to an object (of the original type). -
format
-
parse
-