|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmoteaccess.Condition
Class representing a range condition on a sensor reading. Used in conjunction with the MoteReaction class to describe the conditions under which a reaction fires.
Field Summary | |
static int |
ANY
Constant that indicates the unspecified operation. |
static int |
BETWEEN
Constant that indicates the between operation. |
static int |
EQUAL_TO
Constant that indicates the equal to operation. |
static int |
GREATER_THAN
Constant that indicates the greater than operation. |
static int |
LESS_THAN
Constant that indicates the less than operation. |
private int |
lower
Lower bound of a between operation. |
private int |
type
Int value that indicates the type of the instantiation's operation. |
private int |
upper
Upper bound of a between operation. |
Constructor Summary | |
Condition()
Public constructor for an unspecified condition. |
|
Condition(int type,
int lower,
int upper)
Public constructor that builds a condition from the type, lower bound and upper bound. |
Method Summary | |
boolean |
equals(java.lang.Object o)
|
int |
getLower()
Getter for the lower attribute. |
int |
getType()
Getter for the type attribute. |
int |
getUpper()
Getter for the upper attribute. |
int |
hashCode()
The hashCode function is implemented to return the type of the condition. |
java.lang.String |
toReadableString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int LESS_THAN
public static final int GREATER_THAN
public static final int EQUAL_TO
public static final int BETWEEN
public static final int ANY
private int type
private int lower
private int upper
Constructor Detail |
public Condition(int type, int lower, int upper)
type
- the type of the condition.lower
- the lower bound; not used if it's a less thanupper
- the upper bound of the condition; not used if it's a greater than.public Condition()
Method Detail |
public boolean equals(java.lang.Object o)
public int getType()
public int getUpper()
public int getLower()
public int hashCode()
public java.lang.String toReadableString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |