public class FilteredCollection extends AbstractCollection implements Serializable
Collection
which presents a filtered view of
another.Constructor and Description |
---|
FilteredCollection(Collection delegate,
org.apache.commons.collections.Predicate predicate)
Creates a new
FilteredCollection . |
Modifier and Type | Method and Description |
---|---|
boolean |
add(Object object) |
boolean |
contains(Object object) |
boolean |
isEmpty() |
Iterator |
iterator()
Returns an
Iterator over the elements of this
Collection . |
boolean |
remove(Object object) |
int |
size() |
addAll, clear, containsAll, removeAll, retainAll, toArray, toArray, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
equals, hashCode
public FilteredCollection(Collection delegate, org.apache.commons.collections.Predicate predicate)
FilteredCollection
. If a
null
Predicate
is passed to this
constructor, TruePredicate
is used internally.public int size()
size
in interface Collection
size
in class AbstractCollection
public boolean isEmpty()
isEmpty
in interface Collection
isEmpty
in class AbstractCollection
public boolean add(Object object)
add
in interface Collection
add
in class AbstractCollection
public boolean remove(Object object)
remove
in interface Collection
remove
in class AbstractCollection
public boolean contains(Object object)
contains
in interface Collection
contains
in class AbstractCollection
public Iterator iterator()
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
.iterator
in interface Iterable
iterator
in interface Collection
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.