Package org.openl.rules.dt.type
Class StringRangeAdaptor
- java.lang.Object
-
- org.openl.rules.dt.type.StringRangeAdaptor
-
- All Implemented Interfaces:
IRangeAdaptor<StringRange,NumericComparableString>
public final class StringRangeAdaptor extends Object implements IRangeAdaptor<StringRange,NumericComparableString>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description NumericComparableStringadaptValueType(Object value)Adapts value type to the type of specificIRangeAdaptorimplementation.static IRangeAdaptor<StringRange,NumericComparableString>getInstance()NumericComparableStringgetMax(StringRange range)Gets max value of range.NumericComparableStringgetMin(StringRange range)Gets min value of range.booleanuseOriginalSource()
-
-
-
Method Detail
-
getInstance
public static IRangeAdaptor<StringRange,NumericComparableString> getInstance()
-
getMax
public NumericComparableString getMax(StringRange range)
Description copied from interface:IRangeAdaptorGets max value of range.- Specified by:
getMaxin interfaceIRangeAdaptor<StringRange,NumericComparableString>- Returns:
- the max bound of the expression min <= X && X <= max. Returns null if needs maximum possible value.
-
getMin
public NumericComparableString getMin(StringRange range)
Description copied from interface:IRangeAdaptorGets min value of range.- Specified by:
getMinin interfaceIRangeAdaptor<StringRange,NumericComparableString>- Returns:
- the min bound of the expression min <= X && X <= max. Returns null if needs minimum possible value.
-
adaptValueType
public NumericComparableString adaptValueType(Object value)
Description copied from interface:IRangeAdaptorAdapts value type to the type of specificIRangeAdaptorimplementation. To have the possibility to compare these values.- Specified by:
adaptValueTypein interfaceIRangeAdaptor<StringRange,NumericComparableString>- Parameters:
value- that is going to be compared with values returned byIRangeAdaptor.getMax(Object)andIRangeAdaptor.getMin(Object)values.- Returns:
- value, casted to the type of specific
IRangeAdaptorimplementation.
-
useOriginalSource
public boolean useOriginalSource()
- Specified by:
useOriginalSourcein interfaceIRangeAdaptor<StringRange,NumericComparableString>
-
-