com.phoenixst.collections
Class FilteredCollection
java.lang.Object
java.util.AbstractCollection
com.phoenixst.collections.FilteredCollection
- All Implemented Interfaces:
- Serializable, Iterable, Collection
public class FilteredCollection
- extends AbstractCollection
- implements Serializable
A Collection which presents a filtered view of
another.
- Since:
- 1.0
- Version:
- $Revision: 1.11 $
- Author:
- Ray A. Conner
- See Also:
- Serialized Form
|
Constructor Summary |
FilteredCollection(Collection delegate,
org.apache.commons.collections.Predicate predicate)
Creates a new FilteredCollection. |
FilteredCollection
public FilteredCollection(Collection delegate,
org.apache.commons.collections.Predicate predicate)
- Creates a new
FilteredCollection. If a
null Predicate is passed to this
constructor, TruePredicate is used internally.
size
public int size()
- Specified by:
size in interface Collection- Specified by:
size in class AbstractCollection
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty in interface Collection- Overrides:
isEmpty in class AbstractCollection
add
public boolean add(Object object)
- Specified by:
add in interface Collection- Overrides:
add in class AbstractCollection
remove
public boolean remove(Object object)
- Specified by:
remove in interface Collection- Overrides:
remove in class AbstractCollection
contains
public boolean contains(Object object)
- Specified by:
contains in interface Collection- Overrides:
contains in class AbstractCollection
iterator
public Iterator iterator()
- Returns an
Iterator over the elements of this
Collection. If the remove() method
is called after hasNext() without an intervening
call to next(), the last element returned by
next() will be removed by calling Collection.remove( object ) on the
underlying Collection. Depending upon the
underlying Collection implementation, this may
invalidate this Iterator.
- Specified by:
iterator in interface Iterable- Specified by:
iterator in interface Collection- Specified by:
iterator in class AbstractCollection
See the Plexus project home, hosted by SourceForge.
Copyright ? 1994-2006, by Phoenix Software Technologists, Inc. and others. All Rights Reserved. Use is subject to license terms.