Interface IRangeValue
- All Superinterfaces:
Comparable<Object>
,IConvertable
,IPrimitiveValue
,IValue
,Serializable
- All Known Implementing Classes:
AttributeRangeValue
,RangeValue
The range interface defines a continues range between two single value objects. The upper and lower value may be excluded from the range. When for instance the lower value of a range is excluded, the range will run from the lower up to the upper value, but the lower value will not be part of the range.
Please note that a single value may also implement this interface, as a single value is a range where both the upper and lower value are equal and both the upper and lower value is included.
The compareTo method of a range is a bit more complex than the compareTo of a ISingleValue, as two ranges may overlap when compared to each other. The following results may be expected when comparing ranges using the compareTo:
- -1 The given range is greater than this range.
- 0 The is some overlap between the ranges (a merge is needed)
- 1 The given range is lower than this range.
- Since:
- 5.0
- Author:
- O. Kerpershoek
-
Method Summary
Modifier and TypeMethodDescriptionThis method returns the lower value of the range.This method returns the upper value of the range.boolean
This method returns a boolean indicating if the lower value is part of the range.boolean
This method returns a boolean indicating if the upper value is part of the range.Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface com.aquima.interactions.foundation.convert.IConvertable
booleanValue, dateValue, doubleValue, getValue, integerValue, longValue, stringValue
Methods inherited from interface com.aquima.interactions.foundation.IPrimitiveValue
forType, getDisplayValue, getTypeName
Methods inherited from interface com.aquima.interactions.foundation.IValue
contains, duplicate, getDataType, isRangeValue, isSingleValue, isUnknown, toListValue, toRangeValue, toSingleValue
-
Method Details
-
getLowerValue
ISingleValue getLowerValue()This method returns the lower value of the range.- Returns:
- The lower value of the range.
-
getUpperValue
ISingleValue getUpperValue()This method returns the upper value of the range.- Returns:
- The upper value of the range.
-
isLowerIncluded
boolean isLowerIncluded()This method returns a boolean indicating if the lower value is part of the range. When this method returns true the range will start and include the lower value.- Returns:
- Boolean indicating whether the lower value is part of the range.
-
isUpperIncluded
boolean isUpperIncluded()This method returns a boolean indicating if the upper value is part of the range. When this method returns true the range will end at, and include, the upper value.- Returns:
- Boolean indicating whether the upper value is part of the range.
-