public class BooleanValue extends Object implements IValueObject<Boolean>
PATTERN_BASIC_ISO_DATE, PATTERN_CURRENCY, PATTERN_FULL, PATTERN_INTEGER, PATTERN_ISO_DATE, PATTERN_ISO_DATE_TIME, PATTERN_ISO_INSTANT, PATTERN_ISO_LOCAL_DATE, PATTERN_ISO_LOCAL_DATE_TIME, PATTERN_ISO_LOCAL_TIME, PATTERN_ISO_OFFSET_DATE, PATTERN_ISO_OFFSET_DATE_TIME, PATTERN_ISO_OFFSET_TIME, PATTERN_ISO_ORDINAL_DATE, PATTERN_ISO_TIME, PATTERN_ISO_WEEK_DATE, PATTERN_ISO_ZONED_DATE_TIME, PATTERN_LONG, PATTERN_MEDIUM, PATTERN_PERCENT, PATTERN_RFC_1123_DATE_TIME, PATTERN_SHORT, RESOLVER_LENIENT, RESOLVER_LENIENT_NO_BRACKETS, RESOLVER_SMART, RESOLVER_SMART_NO_BRACKETS, RESOLVER_STRICT, RESOLVER_STRICT_NO_BRACKETS
Constructor and Description |
---|
BooleanValue() |
Modifier and Type | Method and Description |
---|---|
long |
asLong(Boolean value,
LocaleInfo localeInfo)
Returns a long value if possible.
|
Boolean |
convert(Object value,
Value.Type oldType,
LocaleInfo localeInfo)
Converts a value from another type.
|
Boolean |
createDefault()
Creates the default value object for the data type.
|
String |
getDescription()
Gets the description of the type, used for the Designer.
|
Format |
getFormatter(String pattern,
LocaleInfo localeInfo)
Returns the Formatter for a pattern.
|
Class<Boolean> |
getValueClass()
Gets the class of the value.
|
Value.Type |
getValueType()
Gets the value type.
|
Boolean |
load(String value,
Element element)
Loads the value from an Element.
|
Boolean |
parse(String value)
Creates a Value object from a String using a specified pattern and locale.
|
Boolean |
parse(String value,
String pattern,
LocaleInfo localeInfo)
Creates a Value object from a String using a specified pattern and locale.
|
String |
save(Boolean value,
Element element)
Saves the value to an Element.
|
String |
toString(Boolean value)
The default "toString" representation.
|
String |
toString(Boolean value,
String pattern,
LocaleInfo localeInfo)
Formats the value to a String.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
asLongCast, isRightAligned, saveCast, toStringCast, toStringForced
public final Value.Type getValueType()
getValueType
in interface IValueObject<Boolean>
public Class<Boolean> getValueClass()
getValueClass
in interface IValueObject<Boolean>
public String getDescription()
getDescription
in interface IValueObject<Boolean>
public Boolean createDefault()
createDefault
in interface IValueObject<Boolean>
public Boolean parse(String value)
parse
in interface IValueObject<Boolean>
value
- The value, never null.public Boolean parse(String value, String pattern, LocaleInfo localeInfo) throws ParseException
parse
in interface IValueObject<Boolean>
value
- The value, never null.pattern
- The pattern, null for none.localeInfo
- The locale info, null for default.ParseException
- For parser errors.public Format getFormatter(String pattern, LocaleInfo localeInfo) throws IllegalArgumentException
getFormatter
in interface IValueObject<Boolean>
pattern
- The pattern to use, null for none.localeInfo
- The locale information instance, or null for none.IllegalArgumentException
- For formatter errors.public String toString(Boolean value)
toString
in interface IValueObject<Boolean>
value
- The value could be null.public String toString(Boolean value, String pattern, LocaleInfo localeInfo)
toString
in interface IValueObject<Boolean>
value
- The value is never null.pattern
- Pattern to use, null for none.localeInfo
- The locale information instance, or null for none.public Boolean load(String value, Element element) throws Exception
load
in interface IValueObject<Boolean>
value
- The String value in the element.element
- The element holding the information for advanced processing using JAXB.Exception
- An exception due to parsing, bean unmarshalling, etc.public String save(Boolean value, Element element) throws Exception
save
in interface IValueObject<Boolean>
value
- The value to save.element
- The element to save information into for advanced processing using JAXB.Exception
public Boolean convert(Object value, Value.Type oldType, LocaleInfo localeInfo) throws Exception
convert
in interface IValueObject<Boolean>
value
- The value to convert.oldType
- The old type, null for not defined.localeInfo
- The locale information, null to look-up from current thread or
if not found, for system default.Exception
- For other errors.ParseException
- If this conversion fails.public long asLong(Boolean value, LocaleInfo localeInfo)
asLong
in interface IValueObject<Boolean>
value
- The Value object.localeInfo
- The locale information, null to look-up from current thread or
if not found, for system default.iizi® is a registered trademark of Mindus SARL. © Copyright 2019 Mindus SARL. All rights reserved.