net.spy.memcached.internal
Class SingleElementInfiniteIterator<T>

java.lang.Object
  extended by 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
SingleElementInfiniteIterator(T element)
          Construct a iterator tat returns the input element an infinite number of times.
 
Method Summary
 boolean hasNext()
           
 T next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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
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-2012 Couchbase, Inc.