Package org.openl.rules.helpers
Class BaseRangeParser
- java.lang.Object
-
- org.openl.rules.helpers.BaseRangeParser
-
- All Implemented Interfaces:
RangeParser
public abstract class BaseRangeParser extends Object implements RangeParser
-
-
Field Summary
Fields Modifier and Type Field Description protected StringmaxMultiplierprotected StringmaxNumberprotected StringminMultiplierprotected StringminNumber
-
Constructor Summary
Constructors Constructor Description BaseRangeParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected NumbergetMax(Number number)StringgetMaxMultiplier()StringgetMaxNumber()protected NumbergetMin(Number number)StringgetMinMultiplier()StringgetMinNumber()protected RangeWithBoundsgetRangeWithBounds(Number first, Number second, String firstBound, String secondBound)Determine, which number is min, which is max and what bounds are.protected doubleparseDoubleWithMultiplier(String number, String suffix)protected longparseIntWithMultiplier(String number, String suffix)protected longparseMultiplier(String suffix)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.openl.rules.helpers.RangeParser
parse
-
-
-
-
Method Detail
-
getMinNumber
public String getMinNumber()
-
getMaxNumber
public String getMaxNumber()
-
getMinMultiplier
public String getMinMultiplier()
-
getMaxMultiplier
public String getMaxMultiplier()
-
parseMultiplier
protected long parseMultiplier(String suffix)
-
getRangeWithBounds
protected RangeWithBounds getRangeWithBounds(Number first, Number second, String firstBound, String secondBound)
Determine, which number is min, which is max and what bounds are.- Parameters:
first- first number in the parsing sequencesecond- second number in the parsing sequencefirstBound- one of "<", "<=", ">", ">="secondBound- one of "<", "<=", ">", ">="- Returns:
- Parsed range
-
-