weka.core
Class WekaEnumeration

java.lang.Object
  extended by weka.core.WekaEnumeration
All Implemented Interfaces:
java.util.Enumeration, RevisionHandler

public class WekaEnumeration
extends java.lang.Object
implements java.util.Enumeration, RevisionHandler

Class for enumerating an array list's elements.


Constructor Summary
WekaEnumeration(java.util.List vector)
          Constructs an enumeration.
WekaEnumeration(java.util.List vector, int special)
          Constructs an enumeration with a special element.
 
Method Summary
 java.lang.String getRevision()
          Returns the revision string.
 boolean hasMoreElements()
          Tests if there are any more elements to enumerate.
 java.lang.Object nextElement()
          Returns the next element.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WekaEnumeration

public WekaEnumeration(java.util.List vector)
Constructs an enumeration.

Parameters:
vector - the vector which is to be enumerated

WekaEnumeration

public WekaEnumeration(java.util.List 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 enumerated
special - the index of the special element
Method Detail

hasMoreElements

public final boolean hasMoreElements()
Tests if there are any more elements to enumerate.

Specified by:
hasMoreElements in interface java.util.Enumeration
Returns:
true if there are some elements left

nextElement

public final java.lang.Object nextElement()
Returns the next element.

Specified by:
nextElement in interface java.util.Enumeration
Returns:
the next element to be enumerated

getRevision

public java.lang.String getRevision()
Returns the revision string.

Specified by:
getRevision in interface RevisionHandler
Returns:
the revision