net.spy.memcached.internal
Class SingleElementInfiniteIterator<T>
java.lang.Object
net.spy.memcached.internal.SingleElementInfiniteIterator<T>
- All Implemented Interfaces:
- Iterator<T>
public class SingleElementInfiniteIterator<T>
- extends Object
- implements Iterator<T>
An iterator that returns a single element for as many elements as
are needed from the iterator; in other words, #hasNext() never
returns false.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SingleElementInfiniteIterator
public SingleElementInfiniteIterator(T element)
- Construct a iterator tat returns the input element an
infinite number of times.
- Parameters:
element - the element that #next() should return
hasNext
public boolean hasNext()
- Specified by:
hasNext in interface Iterator<T>
next
public T next()
- Specified by:
next in interface Iterator<T>
remove
public void remove()
- Specified by:
remove in interface Iterator<T>