edu.neu.ccs.filter
Interface StringableFilter

All Known Implementing Classes:
CaseActionFilter, NumericFilter, StringableFilterSequence

public interface StringableFilter

Interface to be implemented by classes of objects that have the capability of filtering Stringable objects that are generated by user input or created internally for computation. This interface defines the specification for filtering Stringable objects, but does not specify what form of filtering procedure will be applied.

A filter should have specific locally defined criteria, inherited criteria, or both. When a Stringable object is given to a filter, the filter should throw a FilterException if the object does not meet the filter criteria. If the given object meets the criteria, the filter should apply its procedure and return the resulting object.

The intention of the signature for the single method in this specification is that a new object should be returned by the filter if the filter procedure desires to change the state of the given object; A filter should not change the state of a mutable object unless it is absolutely necessary to do so and is documented in the class definition for the filter. If the filter does not change the state of the given object, it is acceptable to return the same object instance given to the filter.

Since:
1.0
Version:
2.2

Method Summary
 Stringable filterStringable(Stringable obj)
          Filters the given object.
 

Method Detail

filterStringable

public Stringable filterStringable(Stringable obj)
                            throws FilterException
Filters the given object.

Parameters:
obj - the object to be filtered
Throws:
FilterException - if the object does not meet the criteria for the filter, or cannot be filtered