Sun SPOT API
Green Release  


com.sun.spot.sensorboard.peripheral
Interface ISwitch

All Known Implementing Classes:
Switch

public interface ISwitch

Represents a simple pushbutton switch


Method Summary
 boolean isClosed()
          Answer true if the switch IS pressed
 boolean isOpen()
          Answer true if the switch is NOT pressed
 void waitForChange()
          Block the current thread until the switch's state changes.
 

Method Detail

isOpen

boolean isOpen()
Answer true if the switch is NOT pressed

Returns:
true if the switch is NOT pressed

isClosed

boolean isClosed()
Answer true if the switch IS pressed

Returns:
true if the switch IS pressed

waitForChange

void waitForChange()
Block the current thread until the switch's state changes.


Sun SPOT API
Green Release  


Copyright © 2006 Sun Microsystems, Inc. All Rights Reserved.