|
Search this API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.util.FilterIterator
public final class FilterIterator
Decorator for Iterator instances that allows the elements
of the decorated Iterator to be filtered using arbitrary
Filter implementations.

| Constructor Summary | |
|---|---|
FilterIterator(java.util.Iterator iterator,
Filter filter)
Constructs a new FilterIterator. |
|
| Method Summary | |
|---|---|
Filter |
getFilter()
Returns the Filter that is used to determine whether or not
an element of the underlying Iterator should be returned by
this FilterIterator, too. |
boolean |
hasNext()
|
java.lang.Object |
next()
|
void |
remove()
Throws UnsupportedOperationException; remove
is not supported by FilterIterator. |
void |
setFilter(Filter filter)
Specifies the Filter that is to be used in determining
whether or not an element of the underlying Iterator should
be returned by this FilterIterator, too. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FilterIterator(java.util.Iterator iterator,
Filter filter)
FilterIterator.
iterator - the Iterator whose elements are to be
filtered. May not be null.filter - the Filter to be used. If null,
all elements of the underlying Iterator are
accepted.| Method Detail |
|---|
public boolean hasNext()
hasNext in interface java.util.Iteratorpublic java.lang.Object next()
next in interface java.util.Iteratorpublic void remove()
UnsupportedOperationException; remove
is not supported by FilterIterator.
remove in interface java.util.Iteratorjava.lang.UnsupportedOperationExceptionpublic Filter getFilter()
Filter that is used to determine whether or not
an element of the underlying Iterator should be returned by
this FilterIterator, too.
Filter that is used to determine whether or not
an element of the underlying Iterator should be returned by
this FilterIterator, too.public void setFilter(Filter filter)
Filter that is to be used in determining
whether or not an element of the underlying Iterator should
be returned by this FilterIterator, too.
filter - the Filter that is to be used in determining
whether or not an element of the underlying
Iterator should be returned by this
FilterIterator, too.
|
© Copyright 2000-2025, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||