edu.colby.cs.JeSS.util
Class VectorVisitorCollection

java.lang.Object
  extended byedu.colby.cs.JeSS.util.VectorVisitorCollection
All Implemented Interfaces:
JeSSVisitorCollection

public class VectorVisitorCollection
extends java.lang.Object
implements JeSSVisitorCollection

The current implementation of JeSSVisitorCollection. This is done using a Vector as a delegate.


Field Summary
private  java.util.Vector collection
           
 
Constructor Summary
VectorVisitorCollection()
           
 
Method Summary
 void add(JeSSVisitor visitor)
          Add another visitor to the Collection
 void append(JeSSVisitorCollection otherJeSSVC)
          Add all visitors from another Collection of this type
 JeSSVisitor elementAt(int i)
          Retrieve an element at specified location
 java.util.Collection getCollection()
          A helper method for append.
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

collection

private java.util.Vector collection
Constructor Detail

VectorVisitorCollection

public VectorVisitorCollection()
Method Detail

elementAt

public JeSSVisitor elementAt(int i)
Description copied from interface: JeSSVisitorCollection
Retrieve an element at specified location

Specified by:
elementAt in interface JeSSVisitorCollection
Parameters:
i - - the location of the desired element
Returns:
JeSSVisitor - the JeSSVisitor at i

add

public void add(JeSSVisitor visitor)
Description copied from interface: JeSSVisitorCollection
Add another visitor to the Collection

Specified by:
add in interface JeSSVisitorCollection
Parameters:
visitor - - the visitor to be added

append

public void append(JeSSVisitorCollection otherJeSSVC)
Description copied from interface: JeSSVisitorCollection
Add all visitors from another Collection of this type

Specified by:
append in interface JeSSVisitorCollection
Parameters:
otherJeSSVC - - the collection to be added

getCollection

public java.util.Collection getCollection()
Description copied from interface: JeSSVisitorCollection
A helper method for append. This allows any implementations of this interface to use any type of delegate so long as it is a collection

Specified by:
getCollection in interface JeSSVisitorCollection
Returns:
Collection - the underlying delegate collection of an implementation of JeSSVisitorCollection

size

public int size()
Specified by:
size in interface JeSSVisitorCollection
Returns:
the number of elements in the collection