com.phoenixst.collections

Class FilteredCollection

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

Constructor Summary
FilteredCollection(Collection delegate, Predicate predicate)
Creates a new FilteredCollection.
Method Summary
booleanadd(Object object)
booleancontains(Object object)
booleanisEmpty()
Iteratoriterator()
Returns an Iterator over the elements of this Collection.
booleanremove(Object object)
intsize()

Constructor Detail

FilteredCollection

public FilteredCollection(Collection delegate, Predicate predicate)
Creates a new FilteredCollection. If a null Predicate is passed to this constructor, TruePredicate is used internally.

Method Detail

add

public boolean add(Object object)

contains

public boolean contains(Object object)

isEmpty

public boolean isEmpty()

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 Collection.remove( object ) on the underlying Collection. Depending upon the underlying Collection implementation, this may invalidate this Iterator.

remove

public boolean remove(Object object)

size

public int size()
See the Plexus project home, hosted by SourceForge.
Copyright B) 1994-2006, by Phoenix Software Technologists, Inc. and others. All Rights Reserved. Use is subject to license terms.