org.openjena.atlas.iterator
Class PeekIterator<T>
java.lang.Object
org.openjena.atlas.iterator.PeekIterator<T>
- All Implemented Interfaces:
- Iterator<T>
public class PeekIterator<T>
- extends Object
- implements Iterator<T>
PeekIterator - is one slot ahead from the wrapped iterator
PeekIterator
public PeekIterator(Iterator<T> iter)
create
public static <T> PeekIterator<T> create(PeekIterator<T> iter)
create
public static <T> PeekIterator<T> create(Iterator<T> iter)
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface Iterator<T>
peek
public T peek()
- Peek the next element or throw NoSuchElementException
peekOrNull
public T peekOrNull()
- Peek the next element or return null
next
public T next()
- Specified by:
next
in interface Iterator<T>
remove
public void remove()
- Specified by:
remove
in interface Iterator<T>
Licenced under the Apache License, Version 2.0