Mp3dings 
20100427

net.sourceforge.mp3dings.filter
Class FilterCollection

java.lang.Object
  extended by net.sourceforge.mp3dings.filter.FilterCollection

public class FilterCollection
extends Object

A collection that holds all the filters for all the fields in an mp3dings table.

Version:
$Revision: 69 $ ($Date: 2007-10-24 23:57:43 +0200 (Mi, 24 Okt 2007) $)
Author:
Moritz Ringler

Constructor Summary
FilterCollection()
          Constructs a new FilterCollection.
FilterCollection(FilterCollection fc)
          Creates a new filter collection that contains all the filters in fc.
FilterCollection(Preferences beanSetNode)
          Loads a FilterCollection from a preference node.
 
Method Summary
 Object filter(Field field, Object value)
          Filters the Object value with all filters registered for the specified field.
 FilteredField getFilteredField(Field field)
          Gets the filteredField attribute of the FilterCollection object
 BeanSet getFilterSet()
          Gets the filterSet attribute of the FilterCollection object
 boolean isFiltered(Field field)
          Returns whether any filters are currently registered for the specified field.
 void load(Preferences filterNode)
          Adds the filters saved under the given node.
 void setFilteredField(Field field, FilteredField ff)
          Sets the filteredField attribute of the FilterCollection object
 void setFilterSet(BeanSet filterset)
          Sets the filterSet attribute of the FilterCollection object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilterCollection

public FilterCollection(Preferences beanSetNode)
Loads a FilterCollection from a preference node.

Parameters:
beanSetNode - Description of the Parameter

FilterCollection

public FilterCollection()
Constructs a new FilterCollection.


FilterCollection

public FilterCollection(FilterCollection fc)
Creates a new filter collection that contains all the filters in fc. The filters themselves are not cloned.

Parameters:
fc - The FilterCollection to copy
Method Detail

setFilterSet

public void setFilterSet(BeanSet filterset)
Sets the filterSet attribute of the FilterCollection object

Parameters:
filterset - The new filterSet value

getFilterSet

public BeanSet getFilterSet()
Gets the filterSet attribute of the FilterCollection object

Returns:
The filterSet value

load

public void load(Preferences filterNode)
Adds the filters saved under the given node.

Parameters:
filterNode - Description of the Parameter

getFilteredField

public FilteredField getFilteredField(Field field)
Gets the filteredField attribute of the FilterCollection object

Parameters:
field - Returns the filters for the specified field in the form of a FilteredField object.
Returns:
The filteredField value

setFilteredField

public void setFilteredField(Field field,
                             FilteredField ff)
Sets the filteredField attribute of the FilterCollection object

Parameters:
field - The new filteredField value
ff - The new filteredField value

filter

public Object filter(Field field,
                     Object value)
Filters the Object value with all filters registered for the specified field. The returned object is guaranteed to be of the same class as value.

Parameters:
field - The field the value belongs to
value - The value to be filtered
Returns:
the filtered value, will be an instance of the class of value if value is non-null

isFiltered

public boolean isFiltered(Field field)
Returns whether any filters are currently registered for the specified field.

Parameters:
field - the field whose status you want to know
Returns:
the filter status of the field

Mp3dings 
20100427