Package weka.core
Class WekaEnumeration<E>
- java.lang.Object
-
- weka.core.WekaEnumeration<E>
-
- All Implemented Interfaces:
java.util.Enumeration<E>,RevisionHandler
public class WekaEnumeration<E> extends java.lang.Object implements java.util.Enumeration<E>, RevisionHandler
Class for enumerating an array list's elements.
-
-
Constructor Summary
Constructors Constructor Description WekaEnumeration(java.util.List<E> vector)Constructs an enumeration.WekaEnumeration(java.util.List<E> vector, int special)Constructs an enumeration with a special element.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetRevision()Returns the revision string.booleanhasMoreElements()Tests if there are any more elements to enumerate.EnextElement()Returns the next element.
-
-
-
Constructor Detail
-
WekaEnumeration
public WekaEnumeration(java.util.List<E> vector)
Constructs an enumeration.- Parameters:
vector- the vector which is to be enumerated
-
WekaEnumeration
public WekaEnumeration(java.util.List<E> vector, int special)
Constructs an enumeration with a special element. The special element is skipped during the enumeration.- Parameters:
vector- the vector which is to be enumeratedspecial- the index of the special element
-
-
Method Detail
-
hasMoreElements
public final boolean hasMoreElements()
Tests if there are any more elements to enumerate.- Specified by:
hasMoreElementsin interfacejava.util.Enumeration<E>- Returns:
- true if there are some elements left
-
nextElement
public final E nextElement()
Returns the next element.- Specified by:
nextElementin interfacejava.util.Enumeration<E>- Returns:
- the next element to be enumerated
-
getRevision
public java.lang.String getRevision()
Returns the revision string.- Specified by:
getRevisionin interfaceRevisionHandler- Returns:
- the revision
-
-