JTemporal Home
Tutorial

net.sf.jtemporal.util
Class SingleElementIterator

java.lang.Object
  extended by net.sf.jtemporal.util.SingleElementIterator
All Implemented Interfaces:
java.util.Iterator

public class SingleElementIterator
extends java.lang.Object
implements java.util.Iterator

A read-only Iterator, iterating over a single element.

Version:
$Id: SingleElementIterator.java,v 1.1 2005/06/05 21:49:30 tabeck Exp $

Constructor Summary
SingleElementIterator(java.lang.Object element)
          Unique constructor.
 
Method Summary
 boolean hasNext()
           
 java.lang.Object next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingleElementIterator

public SingleElementIterator(java.lang.Object element)
Unique constructor.

Parameters:
element - the element that will be returned once and only once by the next() method
Method Detail

remove

public void remove()
Specified by:
remove in interface java.util.Iterator

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator

next

public java.lang.Object next()
Specified by:
next in interface java.util.Iterator

JTemporal Home
Tutorial