de.jstacs.data
Class DataSet.ElementEnumerator
java.lang.Object
de.jstacs.data.DataSet.ElementEnumerator
- All Implemented Interfaces:
- RecyclableSequenceEnumerator, Enumeration<Sequence>, Iterator<Sequence>
- Enclosing class:
- DataSet
public static class DataSet.ElementEnumerator
- extends Object
- implements RecyclableSequenceEnumerator, Iterator<Sequence>
This class can be used to have a fast sequential access to a
DataSet. It enumerates all elements
of a DataSet.
As further functionality the method reset() is implemented to
reuse an DataSet.ElementEnumerator.
- Author:
- Jens Keilwagen
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DataSet.ElementEnumerator
public DataSet.ElementEnumerator(DataSet data)
- Creates a new
DataSet.ElementEnumerator on the given DataSet
data.
- Parameters:
data - the given DataSet
hasMoreElements
public boolean hasMoreElements()
- Specified by:
hasMoreElements in interface Enumeration<Sequence>
nextElement
public Sequence nextElement()
- Specified by:
nextElement in interface Enumeration<Sequence>
reset
public void reset()
- Description copied from interface:
RecyclableSequenceEnumerator
- This method enables the user to reuse this enumerator.
- Specified by:
reset in interface RecyclableSequenceEnumerator
hasNext
public boolean hasNext()
- Specified by:
hasNext in interface Iterator<Sequence>
next
public Sequence next()
- Specified by:
next in interface Iterator<Sequence>
remove
public void remove()
- Specified by:
remove in interface Iterator<Sequence>