public interface State extends UsesCustomNull
BleDeviceState
and BleManagerState
.
Not intended for subclassing outside this library but go wild if you want.Modifier and Type | Interface and Description |
---|---|
static class |
State.ChangeEvent<T_State extends State>
Abstract base class for
DeviceStateListener.StateEvent and ManagerStateListener.StateEvent . |
static class |
State.ChangeIntent
Enumerates the intention behind a state change - as comprehensively as possible, whether the
application user intended for the state change to happen or not.
|
Modifier and Type | Method and Description |
---|---|
boolean |
didEnter(int oldStateBits,
int newStateBits)
Given an old and new state mask, for example from
DeviceStateListener.onEvent(com.idevicesinc.sweetblue.DeviceStateListener.StateEvent)
or ManagerStateListener.onEvent(com.idevicesinc.sweetblue.ManagerStateListener.StateEvent) , this method tells you whether the
the 'this' state was appended. |
boolean |
didExit(int oldStateBits,
int newStateBits)
Reverse of
didEnter(int, int) . |
boolean |
isNull()
Returns
true if this state is meant to stand in for Java's built-in null . |
boolean didEnter(int oldStateBits, int newStateBits)
DeviceStateListener.onEvent(com.idevicesinc.sweetblue.DeviceStateListener.StateEvent)
or ManagerStateListener.onEvent(com.idevicesinc.sweetblue.ManagerStateListener.StateEvent)
, this method tells you whether the
the 'this' state was appended.didExit(int, int)
boolean didExit(int oldStateBits, int newStateBits)
didEnter(int, int)
.didEnter(int, int)
boolean isNull()
true
if this state is meant to stand in for Java's built-in null
.isNull
in interface UsesCustomNull