|
SunSPOT API V3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ISwitch
Represents a simple pushbutton switch
Method Summary | |
---|---|
void |
addISwitchListener(ISwitchListener who)
Adds the specified switch listener to receive callbacks from this switch. |
ISwitchListener[] |
getISwitchListeners()
Returns an array of all the switch listeners registered on this switch. |
boolean |
isClosed()
Return true if the switch IS pressed. |
boolean |
isOpen()
Return true if the switch is NOT pressed |
void |
removeISwitchListener(ISwitchListener who)
Removes the specified switch listener so that it no longer receives callbacks from this switch. |
void |
waitForChange()
Block the current thread until the switch's state changes. |
Method Detail |
---|
boolean isOpen()
boolean isClosed()
void waitForChange()
void addISwitchListener(ISwitchListener who)
who
- the switch listener to add.void removeISwitchListener(ISwitchListener who)
who
- the switch listener to remove.ISwitchListener[] getISwitchListeners()
|
SunSPOT API V3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |