public class Relation
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
(package private) int |
high |
(package private) boolean |
integer |
(package private) int |
low |
(package private) int |
mod |
(package private) boolean |
negated |
| Constructor and Description |
|---|
Relation(int low,
int high) |
Relation(java.util.List<java.lang.String> tokens) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
matches(double number)
Returns true if the given number matches this relation.
|
private void |
parse(java.util.List<java.lang.String> input)
Parses a list of string tokens.
|
void |
setInteger(boolean value)
Determines whether this relation only matches integers
(defaults to true).
|
void |
setMod(int mod)
Sets the divisor for a modulo operation (defaults to 1).
|
void |
setNegated(boolean value)
Negates the return value of the relation (defaults to false).
|
java.lang.String |
toString() |
public Relation(java.util.List<java.lang.String> tokens)
public Relation(int low,
int high)
public void setMod(int mod)
mod - an int valuepublic void setNegated(boolean value)
value - a boolean valuepublic void setInteger(boolean value)
value - a boolean valuepublic boolean matches(double number)
number - a double valueboolean valuepublic java.lang.String toString()
toString in class java.lang.Objectprivate void parse(java.util.List<java.lang.String> input)
input - a list of string tokens