- java.lang.Object
-
- net.spy.memcached.internal.SingleElementInfiniteIterator<T>
-
- All Implemented Interfaces:
- java.util.Iterator<T>
public class SingleElementInfiniteIterator<T>
extends java.lang.Object
implements java.util.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.
-
-
Constructor Summary
Constructors
Constructor and Description |
SingleElementInfiniteIterator(T element)
Construct a iterator tat returns the input element an infinite number of
times.
|
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface java.util.Iterator<T>
-
next
public T next()
- Specified by:
next
in interface java.util.Iterator<T>
-
remove
public void remove()
- Specified by:
remove
in interface java.util.Iterator<T>
Copyright © 2006-2009 Dustin Sallings, 2009-2013 Couchbase, Inc.