- java.lang.Object
-
- org.ojalgo.type.context.FormatContext<java.lang.Boolean>
-
- org.ojalgo.type.context.BooleanContext
-
- All Implemented Interfaces:
TypeContext<java.lang.Boolean>
public final class BooleanContext extends FormatContext<java.lang.Boolean>
-
-
Field Summary
Fields Modifier and Type Field Description private static java.text.FormatDEFAULT_FORMAT-
Fields inherited from class org.ojalgo.type.context.FormatContext
NBSP
-
-
Constructor Summary
Constructors Modifier Constructor Description BooleanContext()BooleanContext(java.lang.String trueValue, java.lang.String falseValue)privateBooleanContext(java.text.Format format)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidconfigureFormat(java.text.Format format, java.lang.Object object)java.lang.Booleanenforce(java.lang.Boolean object)Will force the object to conform to the context's specification.protected java.lang.StringhandleFormatException(java.text.Format format, java.lang.Object object)protected java.lang.BooleanhandleParseException(java.text.Format format, java.lang.String string)-
Methods inherited from class org.ojalgo.type.context.FormatContext
format, format, getFormat, isConfigured, parse, withFormat
-
-
-
-
Method Detail
-
enforce
public java.lang.Boolean enforce(java.lang.Boolean object)
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).
-
configureFormat
protected void configureFormat(java.text.Format format, java.lang.Object object)- Specified by:
configureFormatin classFormatContext<java.lang.Boolean>
-
handleFormatException
protected java.lang.String handleFormatException(java.text.Format format, java.lang.Object object)- Specified by:
handleFormatExceptionin classFormatContext<java.lang.Boolean>
-
handleParseException
protected java.lang.Boolean handleParseException(java.text.Format format, java.lang.String string)- Specified by:
handleParseExceptionin classFormatContext<java.lang.Boolean>
-
-