Class AttributeRangeValue
java.lang.Object
com.aquima.interactions.foundation.convert.Convertable
com.aquima.interactions.foundation.types.RangeValue
com.aquima.interactions.profile.model.value.AttributeRangeValue
- All Implemented Interfaces:
IConvertable
,IPrimitiveValue
,IRangeValue
,IValue
,Serializable
,Comparable<Object>
Profile value object for a range value.
This class is introduced to provide more information (attribute/instance) in case of a ConversionException.
- Since:
- 7.0
- Author:
- Jon van Leuven
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AttributeRangeValue
(RangeValue 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.RangeValue
compareRanges, compareTo, contains, duplicate, equals, forType, getDataType, getDisplayValue, getDisplayValue, getLowerValue, getTypeName, getUpperValue, getValue, hashCode, isLowerIncluded, isRangeValue, isSingleValue, isUnknown, isUpperIncluded, lessThan, moreThan, toListValue, toString, valueOf
Methods inherited from class com.aquima.interactions.foundation.convert.Convertable
instantValue, localDateTimeValue
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.aquima.interactions.foundation.convert.IConvertable
instantValue, localDateTimeValue
-
Constructor Details
-
Method Details
-
booleanValue
public boolean booleanValue()Description copied from interface:IConvertable
This method converts the internal value to a boolean primitive.- Specified by:
booleanValue
in interfaceIConvertable
- Overrides:
booleanValue
in classConvertable
- Returns:
- Boolean primitive of the internal value.
-
dateValue
Description copied from interface:IConvertable
This method converts the internal value to a date object.- Specified by:
dateValue
in interfaceIConvertable
- Overrides:
dateValue
in classConvertable
- Returns:
- Date object of the internal value.
-
doubleValue
public double doubleValue()Description copied from interface:IConvertable
This method converts the internal value to a double primitive.- Specified by:
doubleValue
in interfaceIConvertable
- Overrides:
doubleValue
in classConvertable
- Returns:
- Double primitive of the internal value.
-
integerValue
public int integerValue()Description copied from interface:IConvertable
This method converts the internal value to an integer primitive.- Specified by:
integerValue
in interfaceIConvertable
- Overrides:
integerValue
in classConvertable
- Returns:
- Integer primitive of the internal value.
-
longValue
public long longValue()Description copied from interface:IConvertable
This method converts the internal value to a long primitive.- Specified by:
longValue
in interfaceIConvertable
- Overrides:
longValue
in classConvertable
- Returns:
- Long primitive of the internal value.
-
stringValue
Description copied from interface:IConvertable
This method converts the internal value to a String object.- Specified by:
stringValue
in interfaceIConvertable
- Overrides:
stringValue
in classConvertable
- Returns:
- String object of the internal value.
-
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 classRangeValue
- Returns:
- The same value as a range value.
-
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 classRangeValue
- Returns:
- The same value as single value.
-