public abstract class Event
extends java.lang.Object
State.ChangeEvent
.Constructor and Description |
---|
Event() |
Modifier and Type | Method and Description |
---|---|
boolean |
isFor(java.lang.Object value)
More reader-friendly of
isForAll(Object...) or isForAny(Object...) in the event you only have one parameter to match. |
boolean |
isForAll(java.lang.Object... values)
Convenience query method to check if this event "is for"/relevant-to all of the supplied values.
|
boolean |
isForAny(java.lang.Object... values)
Convenience query method to check if this event "is for"/relevant-to any of the supplied values.
|
public boolean isFor(java.lang.Object value)
isForAll(Object...)
or isForAny(Object...)
in the event you only have one parameter to match.public boolean isForAny(java.lang.Object... values)
ReadWriteListener.ReadWriteEvent
you could write
e.isForAny("DE:CA::FF:CO::FF::EE", "DE:AD:BE:EF:BA:BE")
to quickly check if the event
is associated with either of the two devices. This method would then just do a comparison
with the input strings against ReadWriteListener.ReadWriteEvent.macAddress()
.public boolean isForAll(java.lang.Object... values)
ReadWriteListener.ReadWriteEvent
you could write
e.isForAll("DE:CA::FF:CO::FF::EE", MY_UUID)
to quickly check if the event
is associated with both the given mac address and the given UUID
(e.g. for a characteristic).
This method would then just do a comparison with the input values against ReadWriteListener.ReadWriteEvent.macAddress()
,
ReadWriteListener.ReadWriteEvent.charUuid()
ReadWriteListener.ReadWriteEvent.descUuid()
, and
ReadWriteListener.ReadWriteEvent.serviceUuid()
.