public class FilteredIterator extends Object implements Iterator<ICompilerProblem>
| Constructor and Description |
|---|
FilteredIterator(Iterator<ICompilerProblem> problems,
IProblemFilter filter)
Construct a FilteredIterator.
|
| Modifier and Type | Method and Description |
|---|---|
static Iterable<ICompilerProblem> |
getFilteredIterable(Collection<ICompilerProblem> problems,
IProblemFilter filter)
Convenience method extends the FilteredIterator concept to an Iterable.
|
boolean |
hasNext()
Find the next element of the underlying sequence
that the filter accepts.
|
ICompilerProblem |
next()
Find and fetch the next element of the underlying sequence
that the filter accepts.
|
void |
remove()
This iterator cannot remove elements.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingpublic FilteredIterator(Iterator<ICompilerProblem> problems, IProblemFilter filter)
problems - - the underlying problem sequence.filter - - the filter to apply to the problems.public boolean hasNext()
hasNext in interface Iterator<ICompilerProblem>public ICompilerProblem next()
next in interface Iterator<ICompilerProblem>NoSuchElementException - if no more elements found.public void remove()
remove in interface Iterator<ICompilerProblem>UnsupportedOperationException - in all cases.public static Iterable<ICompilerProblem> getFilteredIterable(Collection<ICompilerProblem> problems, IProblemFilter filter)
problems - - an Iterable (collection) of problems.filter - - the filter to apply to the problems.Copyright © 2023 The Apache Software Foundation. All rights reserved.