|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jmatchparser.util.NumberExpression
public class NumberExpression
An expression that matches nonnegative numbers. This supports cron-like
expressions, like 1,3-6,100-200,666,1000-3000/5,400-/7
,
-100,102-
or *
. Odd or even numbers can be matched
either by cron's step syntax, or by suffixing a simple range (without step
values) with e
or o
.
Constructor Summary | |
---|---|
NumberExpression(String pattern)
Create a new NumberExpression . |
Method Summary | |
---|---|
int |
getMaximum()
Return the maximum number that can be matched. |
int |
getMinimum()
Return the minimum number that can be matched. |
boolean |
matches(int number)
Check whether this number expression matches the given number. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NumberExpression(String pattern)
NumberExpression
.
pattern
- the expression pattern.
IllegalArgumentException
- if the pattern is malformedMethod Detail |
---|
public boolean matches(int number)
number
- the number to check against
public int getMinimum()
public int getMaximum()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |