classpathhelper
Class CompositeClassStoreContentsFilter

java.lang.Object
  extended byclasspathhelper.CompositeClassStoreContentsFilter
All Implemented Interfaces:
ClassStoreContentsFilter

public class CompositeClassStoreContentsFilter
extends java.lang.Object
implements ClassStoreContentsFilter

Composite object that groups together a series of ClassStoreContentsFilter objects.

Since:
1.0
Author:
bharris

Constructor Summary
CompositeClassStoreContentsFilter()
           
 
Method Summary
 boolean acceptItem(ClassStore store, java.lang.String fullPath)
          Basic filtering method that indicates whether or not an item should be visible from the class store.
 void addClassStoreContentsFilter(ClassStoreContentsFilter filter)
          Adds a new filter to this composite.
 boolean removeClassStoreContentsFilter(ClassStoreContentsFilter filter)
          Removes a filter from the composite.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeClassStoreContentsFilter

public CompositeClassStoreContentsFilter()
Method Detail

addClassStoreContentsFilter

public void addClassStoreContentsFilter(ClassStoreContentsFilter filter)
Adds a new filter to this composite. Filters can only be added once. If the same filter is added multiple times, subsequent adds will be ignored.

Parameters:
filter - The new filter object.
Since:
1.0

removeClassStoreContentsFilter

public boolean removeClassStoreContentsFilter(ClassStoreContentsFilter filter)
Removes a filter from the composite.

Parameters:
filter - The filter to remove.
Returns:
true If the filter was in the composite, otherwise false
Since:
1.0

acceptItem

public boolean acceptItem(ClassStore store,
                          java.lang.String fullPath)
Description copied from interface: ClassStoreContentsFilter
Basic filtering method that indicates whether or not an item should be visible from the class store.

Specified by:
acceptItem in interface ClassStoreContentsFilter
Parameters:
store - The store using this filter. Implementations of this class should query the ClassStore to find out what character is used as a separator.
fullPath - The full path within the store to the item.
Returns:
true If this item should be visible in the class store, otherwise false