Package org.openl.rules.helpers
Class CharRange
- java.lang.Object
-
- org.openl.rules.range.Range<Character>
-
- org.openl.rules.helpers.CharRange
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openl.rules.range.Range
Range.Bound, Range.Type
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CharRangeautocast(char x, CharRange y)protected intcompare(Character left, Character right)booleancontains(Character value)WARNING: Due limitation of OpenL which cannot work correctly with class level generics, so it is declared as protected.static intdistance(char x, CharRange y)protected voidformat(StringBuilder sb, Character ch)protected CharactergetLeft()CharactergetMax()CharactergetMin()protected CharactergetRight()Range.TypegetType()
-
-
-
Field Detail
-
min
protected final Character min
-
max
protected final Character max
-
type
protected final Range.Type type
-
-
Constructor Detail
-
CharRange
public CharRange(char min, char max)
-
CharRange
public CharRange(char c)
-
CharRange
public CharRange(String range)
-
-
Method Detail
-
contains
public boolean contains(Character value)
Description copied from class:RangeWARNING: Due limitation of OpenL which cannot work correctly with class level generics, so it is declared as protected. It needs to define public method in children classes with type of generic parameter. OpenL can correctly select required method or show an error.
-
getType
public Range.Type getType()
-
getMin
public Character getMin()
-
getMax
public Character getMax()
-
format
protected void format(StringBuilder sb, Character ch)
-
distance
public static int distance(char x, CharRange y)
-
-