edu.rice.cs.plt.iter
Class SingletonIterator<T>
java.lang.Object
edu.rice.cs.plt.iter.ReadOnlyIterator<T>
edu.rice.cs.plt.iter.SingletonIterator<T>
- All Implemented Interfaces:
- Iterator<T>
public class SingletonIterator<T>
- extends ReadOnlyIterator<T>
An Iterator over a 1-length list
|
Method Summary |
boolean |
hasNext()
|
static
|
make(T element)
Call the constructor (allows T to be inferred) |
T |
next()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SingletonIterator
public SingletonIterator(T element)
hasNext
public boolean hasNext()
next
public T next()
make
public static <T> SingletonIterator<T> make(T element)
- Call the constructor (allows
T to be inferred)