frog
Interface Filter

All Superinterfaces:
Serializable
All Known Implementing Classes:
DirectorialEquivalence, IdleState

public interface Filter
extends Serializable

Common interface for all Filters. Allows FROG to pass the argument String and samples into them.

WARNING! Do not attempt to create a constructor that requires parameters or make the constructor private! FROG must be able to call Class.newInstance() on your Filter to instantiate it!

Author:
Team Better Recognize

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 param)
          Sets up this Filter with a given comma-separated String.
 

Method Detail

filter

Accel3D filter(Accel3D acc)
Takes in a sample and returns either the unchanged sample or null depending on the Filter's criteria.

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

getDefaults

String getDefaults()
Returns the default parameter String for this Filter.

Returns:
the default parameter String that will be used in setup if a blank is given

getName

String getName()
Returns the name of this Filter.

Returns:
the name of this Filter

getParameters

String getParameters()
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.

Returns:
the current parameter String for this Filter

setup

void setup(String param)
Sets up this Filter with a given comma-separated String. This String may contain parameters a user may wish to change about the Filter.

Parameters:
param -