frog
Class IdleState

java.lang.Object
  extended by frog.IdleState
All Implemented Interfaces:
Filter, Serializable

public class IdleState
extends Object
implements Filter

Filter for removing vectors based on their magnitude. If a vector has a magnitude less than the threshold, it is discarded.

Author:
Team Better Recognize
See Also:
Serialized Form

Constructor Summary
IdleState()
          Creates the Filter with a default threshold of 1.2.
 
Method Summary
 Accel3D filter(Accel3D acc)
          Takes in a sample and returns either the unchanged sample or null depending on the Filter's criteria.
 String getDefaults()
          Returns the default parameter String for this Filter.
 String getName()
          Returns the name of this Filter.
 String getParameters()
          Returns the current parameters in a comma-separated String of values.
 void setup(String args)
          Takes only one value, a threshold.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdleState

public IdleState()
Creates the Filter with a default threshold of 1.2.

Method Detail

filter

public Accel3D filter(Accel3D acc)
Description copied from interface: Filter
Takes in a sample and returns either the unchanged sample or null depending on the Filter's criteria.

Specified by:
filter in interface Filter
Parameters:
acc - data to be filtered out
Returns:
null if the filter removed this Accel3D. Otherwise returns the original Accel3D unmodified.

getDefaults

public String getDefaults()
Description copied from interface: Filter
Returns the default parameter String for this Filter.

Specified by:
getDefaults in interface Filter
Returns:
the default parameter String that will be used in setup if a blank is given

getName

public String getName()
Description copied from interface: Filter
Returns the name of this Filter.

Specified by:
getName in interface Filter
Returns:
the name of this Filter

getParameters

public String getParameters()
Description copied from interface: Filter
Returns the current parameters in a comma-separated String of values. The values are returned in exactly the same order and style that they would be passed in through the setup(String) method.

Specified by:
getParameters in interface Filter
Returns:
the current parameter String for this Filter

setup

public void setup(String args)
Takes only one value, a threshold.
Example parameter Strings:

Specified by:
setup in interface Filter