Constructor and Description |
---|
PeekIterator(Iterator<T> iter) |
Modifier and Type | Method and Description |
---|---|
static <T> PeekIterator<T> |
create(Iterator<T> iter) |
static <T> PeekIterator<T> |
create(PeekIterator<T> iter) |
T |
element()
Peek the next element or throw NoSuchElementException
|
boolean |
hasNext() |
T |
next() |
T |
peek()
Peek the next element or return null
|
void |
remove() |
public static <T> PeekIterator<T> create(PeekIterator<T> iter)
public static <T> PeekIterator<T> create(Iterator<T> iter)
public T peek()
Queue.peek()
public T element()
Licenced under the Apache License, Version 2.0