scale.common
Class SingleIterator<T>
java.lang.Object
scale.common.SingleIterator<T>
- All Implemented Interfaces:
- java.util.Iterator<T>
public class SingleIterator<T>
- extends java.lang.Object
- implements java.util.Iterator<T>
This class generates an iterator for a single element.
$Id: SingleIterator.java,v 1.5 2005-02-07 21:28:23 burrill Exp $
Copyright 2008 by the
Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SingleIterator
public SingleIterator(T element)
- Parameters:
element
- the single object returned by the iterator
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>