weka.core
Class FastVector.FastVectorEnumeration

java.lang.Object
  extended byweka.core.FastVector.FastVectorEnumeration
All Implemented Interfaces:
java.util.Enumeration
Enclosing class:
FastVector

public class FastVector.FastVectorEnumeration
extends java.lang.Object
implements java.util.Enumeration

Class for enumerating the vector's elements.


Field Summary
private  int m_Counter
          The counter.
private  int m_SpecialElement
          Special element.
private  FastVector m_Vector
          The vector.
 
Constructor Summary
FastVector.FastVectorEnumeration(FastVector vector)
          Constructs an enumeration.
FastVector.FastVectorEnumeration(FastVector vector, int special)
          Constructs an enumeration with a special element.
 
Method Summary
 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_Counter

private int m_Counter
The counter.


m_Vector

private FastVector m_Vector
The vector.


m_SpecialElement

private int m_SpecialElement
Special element. Skipped during enumeration.

Constructor Detail

FastVector.FastVectorEnumeration

public FastVector.FastVectorEnumeration(FastVector vector)
Constructs an enumeration.

Parameters:
vector - the vector which is to be enumerated

FastVector.FastVectorEnumeration

public FastVector.FastVectorEnumeration(FastVector 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