jumbo.xml.util
Class CyclicVector

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--java.util.Vector
                    |
                    +--jumbo.xml.util.CyclicVector

public class CyclicVector
extends java.util.Vector

a 'cyclic vector', i.e. element[0] succeeds element[nElem-1] where nElem is size. Provides elements(startIndex) as Enumeration which iterates through whole of Vector cyclicly. [Normal elements() is inherited from Vector and starts from element[0]]. This class is not thread-safe. The vector and its contents can be changed but Enumerations will be invalidated.

See Also:
Serialized Form

Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
CyclicVector()
          create with an empty vector.
CyclicVector(java.util.Vector vector)
          create from a (non-empty) vector.
 
Method Summary
 java.util.Enumeration elements(int startIndex)
          creates an Enumeration starting at index.
 java.util.Enumeration elements(java.lang.Object startObject)
          creates an Enumeration starting with (first) element containing startObject.
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CyclicVector

public CyclicVector()
create with an empty vector.

CyclicVector

public CyclicVector(java.util.Vector vector)
create from a (non-empty) vector.
Method Detail

elements

public java.util.Enumeration elements(java.lang.Object startObject)
                               throws java.lang.IllegalArgumentException
creates an Enumeration starting with (first) element containing startObject.

elements

public java.util.Enumeration elements(int startIndex)
                               throws java.lang.IllegalArgumentException
creates an Enumeration starting at index.

main

public static void main(java.lang.String[] args)