|
Mobile Sensor API Version 1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.microedition.sensor.ObjectCondition
public final class ObjectCondition
The ObjectCondition
checks the equality of the set limit
to the measured data value. This Condition
is intended
for a channel, the data type of which
is ChannelInfo.TYPE_OBJECT
. The equality is checked by
using the equals()
method of the set limit.
The ObjectCondition
MUST be immutable.
Field Summary |
---|
Fields inherited from interface javax.microedition.sensor.Condition |
---|
OP_EQUALS, OP_GREATER_THAN, OP_GREATER_THAN_OR_EQUALS, OP_LESS_THAN, OP_LESS_THAN_OR_EQUALS |
Constructor Summary | |
---|---|
ObjectCondition(java.lang.Object limit)
Constructs an ObjectCondition . |
Method Summary | |
---|---|
java.lang.Object |
getLimit()
Returns the limit that was set. |
boolean |
isMet(double value)
The method tests if the doubleValue given as a parameter meets the condition |
boolean |
isMet(java.lang.Object value)
Method tests if the given value meets the ObjectCondition . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ObjectCondition(java.lang.Object limit)
Constructs an ObjectCondition
.
The parameter defines the limit that will be used to check the measured values for equality.
limit
- the limit value to be set
java.lang.NullPointerException
- if limit is null
Method Detail |
---|
public final java.lang.Object getLimit()
Returns the limit that was set. The limit Object
could
be, for example, a String
or a byte array.
public boolean isMet(double value)
The method tests if the doubleValue given as a parameter meets the condition
isMet
in interface Condition
value
- the measured data value, the equality of
which to the set limit is checked
false
, because the ObjectCondition
is used for testing Object
values onlypublic boolean isMet(java.lang.Object value)
Method tests if the given value meets the
ObjectCondition
. Equality is tested with the equals
method of the defined limit.
isMet
in interface Condition
value
- the measured data value, the equality of
which to the set limit is checked
true
if ObjectCondition
is
met, false
otherwise
|
Mobile Sensor API Version 1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |