public class FilteringIterator<Dom,E extends Dom> extends java.lang.Object implements PeekableIterator<E>
Modifier and Type | Class and Description |
---|---|
static class |
FilteringIterator.InstanceOf<T> |
EMPTY
Constructor and Description |
---|
FilteringIterator(java.util.Iterator<? extends Dom> delegate,
Condition<? super Dom> condition) |
Modifier and Type | Method and Description |
---|---|
static <T> Condition<T> |
alwaysTrueCondition(java.lang.Class<T> aClass) |
static <T> java.util.Iterator<T> |
create(java.util.Iterator<? extends T> iterator,
Condition<? super T> condition) |
static <T> java.util.Iterator<T> |
createInstanceOf(java.util.Iterator<?> iterator,
java.lang.Class<T> aClass) |
boolean |
hasNext() |
static <T> FilteringIterator.InstanceOf<T> |
instanceOf(java.lang.Class<T> aClass) |
E |
next() |
E |
peek() |
void |
remove()
|
static <T> java.util.Iterator<T> |
skipNulls(java.util.Iterator<? extends T> iterator) |
public boolean hasNext()
public void remove()
public E peek()
peek
in interface PeekableIterator<E extends Dom>
Iterator.hasNext()
returned false might throw NoSuchElementException
.public static <T> java.util.Iterator<T> skipNulls(java.util.Iterator<? extends T> iterator)
public static <T> java.util.Iterator<T> create(java.util.Iterator<? extends T> iterator, Condition<? super T> condition)
public static <T> Condition<T> alwaysTrueCondition(java.lang.Class<T> aClass)
public static <T> FilteringIterator.InstanceOf<T> instanceOf(java.lang.Class<T> aClass)
public static <T> java.util.Iterator<T> createInstanceOf(java.util.Iterator<?> iterator, java.lang.Class<T> aClass)