ch.aplu.nxt
Class SoundAdapter

java.lang.Object
  extended by ch.aplu.nxt.SoundAdapter
All Implemented Interfaces:
SoundListener

public class SoundAdapter
extends java.lang.Object
implements SoundListener

Class with empty callback methods for the sound sensor.


Constructor Summary
SoundAdapter()
           
 
Method Summary
 void loud(SensorPort port, int level)
          Empty method called when the sound becomes louder than the trigger level.
 void quiet(SensorPort port, int level)
          Empty method called when the sound becomes lower than the trigger level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SoundAdapter

public SoundAdapter()
Method Detail

loud

public void loud(SensorPort port,
                 int level)
Empty method called when the sound becomes louder than the trigger level. Override it to process the event.

Specified by:
loud in interface SoundListener
Parameters:
port - the port where the sensor is plugged in
level - the current sound level

quiet

public void quiet(SensorPort port,
                  int level)
Empty method called when the sound becomes lower than the trigger level. Override it to process the event.

Specified by:
quiet in interface SoundListener
Parameters:
port - the port where the sensor is plugged in
level - the current sound level