Constructor and Description |
---|
FilteringIterator(Iterable<T> iterable)
Constructor for FilteringIterator.
|
FilteringIterator(Iterator<T> iterator)
Constructor for FilteringIterator.
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext()
hasNext
|
Iterator<T> |
iterator()
iterator
|
protected abstract boolean |
matches(T item)
matches
|
T |
next()
next
|
void |
remove()
remove
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
forEach, spliterator
public FilteringIterator(Iterable<T> iterable)
Constructor for FilteringIterator.
iterable
- a Iterable
object.public boolean hasNext()
hasNext
protected abstract boolean matches(T item)
matches
item
- a T object.Copyright © 2016. All rights reserved.