Package weka.core

Class WekaEnumeration<E>

java.lang.Object
weka.core.WekaEnumeration<E>
All Implemented Interfaces:
Enumeration<E>, RevisionHandler

public class WekaEnumeration<E> extends Object implements Enumeration<E>, RevisionHandler
Class for enumerating an array list's elements.
  • Constructor Details

    • WekaEnumeration

      public WekaEnumeration(List<E> vector)
      Constructs an enumeration.
      Parameters:
      vector - the vector which is to be enumerated
    • WekaEnumeration

      public WekaEnumeration(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 enumerated
      special - 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 interface Enumeration<E>
      Returns:
      true if there are some elements left
    • nextElement

      public final E nextElement()
      Returns the next element.
      Specified by:
      nextElement in interface Enumeration<E>
      Returns:
      the next element to be enumerated
    • getRevision

      public String getRevision()
      Returns the revision string.
      Specified by:
      getRevision in interface RevisionHandler
      Returns:
      the revision