Package weka.core
Class WekaEnumeration<E>
java.lang.Object
weka.core.WekaEnumeration<E>
- All Implemented Interfaces:
Enumeration<E>
,RevisionHandler
Class for enumerating an array list's elements.
-
Constructor Summary
ConstructorDescriptionWekaEnumeration
(List<E> vector) Constructs an enumeration.WekaEnumeration
(List<E> vector, int special) Constructs an enumeration with a special element. -
Method Summary
Modifier and TypeMethodDescriptionReturns the revision string.final boolean
Tests if there are any more elements to enumerate.final E
Returns the next element.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Enumeration
asIterator
-
Constructor Details
-
WekaEnumeration
Constructs an enumeration.- Parameters:
vector
- the vector which is to be enumerated
-
WekaEnumeration
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 Details
-
hasMoreElements
public final boolean hasMoreElements()Tests if there are any more elements to enumerate.- Specified by:
hasMoreElements
in interfaceEnumeration<E>
- Returns:
- true if there are some elements left
-
nextElement
Returns the next element.- Specified by:
nextElement
in interfaceEnumeration<E>
- Returns:
- the next element to be enumerated
-
getRevision
Returns the revision string.- Specified by:
getRevision
in interfaceRevisionHandler
- Returns:
- the revision
-