de.jstacs.data
Class Sample.ElementEnumerator
java.lang.Object
de.jstacs.data.Sample.ElementEnumerator
- All Implemented Interfaces:
- Enumeration<Sequence>
- Enclosing class:
- Sample
public static class Sample.ElementEnumerator
- extends Object
- implements Enumeration<Sequence>
This class can be used to have a fast sequential access to a sample. It enumerates
all elements of a sample.
As further functionality the method reset() is implemented to reuse an ElementEnumerator.
- Author:
- Jens Keilwagen
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Sample.ElementEnumerator
public Sample.ElementEnumerator(Sample data)
- This constructor creates an new ElementEnumerator on the given
data
- Parameters:
data
- the sample
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()
- Restarts the enumeration.