Class AttributeBooleanValue
java.lang.Object
com.aquima.interactions.foundation.types.AbstractValue
com.aquima.interactions.foundation.types.BooleanValue
com.aquima.interactions.profile.model.value.AttributeBooleanValue
- All Implemented Interfaces:
IConvertable
,IPrimitiveValue
,ISingleValue
,IValue
,Serializable
,Comparable
Profile value object for the boolean type.
This class is introduced to provide more information (attribute/instance) in case of a ConversionException.
- Since:
- 7.0
- Author:
- Jon van Leuven
- See Also:
-
Field Summary
Fields inherited from class com.aquima.interactions.foundation.types.BooleanValue
FALSE, TRUE, UNKNOWN
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AttributeBooleanValue
(BooleanValue delegateValue, ValueReference reference) Construct an attribute value based on a value and an attribute reference. -
Method Summary
Modifier and TypeMethodDescriptionboolean
This method converts the internal value to a boolean primitive.This method converts the internal value to a date object.double
This method converts the internal value to a double primitive.int
This method converts the internal value to an integer primitive.long
This method converts the internal value to a long primitive.This method converts the internal value to a String object.This method will attempt to convert the value to a range value.This method will attempt to convert the value to a single value.Methods inherited from class com.aquima.interactions.foundation.types.BooleanValue
compareSimple, compareTo, contains, duplicate, equals, forType, getDataType, getValue, hashCode, isUnknown, parseBoolean, toString, valueOf, valueOf
Methods inherited from class com.aquima.interactions.foundation.types.AbstractValue
getDisplayValue, getTypeName, isRangeValue, isSingleValue, toListValue
-
Constructor Details
-
AttributeBooleanValue
Construct an attribute value based on a value and an attribute reference.- Parameters:
delegateValue
- The original value.reference
- The reference to the attribute of an instance that has this value.
-
-
Method Details
-
booleanValue
Description copied from interface:IConvertable
This method converts the internal value to a boolean primitive.- Specified by:
booleanValue
in interfaceIConvertable
- Overrides:
booleanValue
in classBooleanValue
- Returns:
- Boolean primitive of the internal value.
- Throws:
ConversionException
- A conversion exception is thrown when the internal value cannot be converted to the requested type.
-
dateValue
Description copied from interface:IConvertable
This method converts the internal value to a date object.- Specified by:
dateValue
in interfaceIConvertable
- Overrides:
dateValue
in classBooleanValue
- Returns:
- Date object of the internal value.
- Throws:
ConversionException
- A conversion exception is thrown when the internal value cannot be converted to the requested type.
-
doubleValue
Description copied from interface:IConvertable
This method converts the internal value to a double primitive.- Specified by:
doubleValue
in interfaceIConvertable
- Overrides:
doubleValue
in classBooleanValue
- Returns:
- Double primitive of the internal value.
- Throws:
ConversionException
- A conversion exception is thrown when the internal value cannot be converted to the requested type.
-
integerValue
Description copied from interface:IConvertable
This method converts the internal value to an integer primitive.- Specified by:
integerValue
in interfaceIConvertable
- Overrides:
integerValue
in classBooleanValue
- Returns:
- Integer primitive of the internal value.
- Throws:
ConversionException
- A conversion exception is thrown when the internal value cannot be converted to the requested type.
-
longValue
Description copied from interface:IConvertable
This method converts the internal value to a long primitive.- Specified by:
longValue
in interfaceIConvertable
- Overrides:
longValue
in classBooleanValue
- Returns:
- Long primitive of the internal value.
- Throws:
ConversionException
- A conversion exception is thrown when the internal value cannot be converted to the requested type.
-
stringValue
Description copied from interface:IConvertable
This method converts the internal value to a String object.- Specified by:
stringValue
in interfaceIConvertable
- Overrides:
stringValue
in classBooleanValue
- Returns:
- String object of the internal value.
- Throws:
ConversionException
- A conversion exception is thrown when the internal value cannot be converted to the requested type.
-
toRangeValue
Description copied from interface:IValue
This method will attempt to convert the value to a range value. The conversion might fail and raise an exception when the value this method is called on is either a list value. The method isRangeValue can be used to determine if this value can safely be converted to a range value. When the value this method is called on already implements the IRangeValue interface, the implementation may return the same value.- Specified by:
toRangeValue
in interfaceIValue
- Overrides:
toRangeValue
in classAbstractValue
- Returns:
- The same value as a range value.
- Throws:
ConversionException
- This exception is raised when the conversion to range value was not possible.
-
toSingleValue
Description copied from interface:IValue
This method will attempt to convert the value to a single value. The conversion might fail and raise an exception when the value this method is called on is either a range or a list value. The method isSingleValue can be used to determine if this value can safely be converted to a single value. When the value this method is called on already implements the ISingleValue interface, the implementation may return the same value.- Specified by:
toSingleValue
in interfaceIValue
- Overrides:
toSingleValue
in classBooleanValue
- Returns:
- The same value as single value.
- Throws:
ConversionException
- This exception is raised when the conversion to single value was not possible.
-