|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.freecol.client.gui.i18n.Relation
public class Relation
| Field Summary | |
|---|---|
(package private) int |
high
|
(package private) boolean |
integer
|
(package private) int |
low
|
(package private) int |
mod
|
(package private) boolean |
negated
|
| Constructor Summary | |
|---|---|
Relation(int low,
int high)
|
|
Relation(java.util.List<java.lang.String> tokens)
|
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
int low
int high
int mod
boolean negated
boolean integer
| Constructor Detail |
|---|
public Relation(java.util.List<java.lang.String> tokens)
public Relation(int low,
int high)
| Method Detail |
|---|
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 value
boolean 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
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||