uci.util
Class VectorSet

java.lang.Object
  |
  +--uci.util.VectorSet

public class VectorSet
extends Object
implements Serializable

An Ordered, non-duplicated collecton of objects (not exactly a mathemetical set because it is ordered). Implemented with a Vector.

See Also:
Serialized Form

Field Summary
static int TC_LIMIT
           
 
Constructor Summary
VectorSet()
           
VectorSet(int n)
           
VectorSet(Object o1)
           
 
Method Summary
 void addAllElements(Enumeration enum)
           
 void addAllElements(Vector v)
           
 void addAllElements(VectorSet s)
           
 void addAllElementsSuchThat(Enumeration enum, Predicate p)
           
 void addAllElementsSuchThat(VectorSet s, Predicate p)
           
 void addElement(Object o)
           
 Vector asVector()
           
 boolean contains(Object o)
           
 boolean containsSuchThat(Predicate p)
           
 Object elementAt(int index)
           
 Enumeration elements()
           
 boolean equals(Object o)
           
 Object findSuchThat(Predicate p)
          return the first element that causes p.predicate() to return true.
 Object firstElement()
           
 VectorSet reachable(ChildGenerator cg)
          Reply the Set of all objects that can be reached from the receiving Set by taking steps defined by the given ChildGenerator.
 VectorSet reachable(ChildGenerator cg, int max, Predicate p)
          Reply the Set of all objects that can be reached from the receiving Set by taking steps defined by the given ChildGenerator.
 void remove(Object o)
           
 void removeAllElements()
           
 void removeElement(Object o)
           
 int size()
           
 String toString()
           
 VectorSet transitiveClosure(ChildGenerator cg)
          Reply the Set of all objects that can be reached from the receiving Set by taking steps defined by the given ChildGenerator.
 VectorSet transitiveClosure(ChildGenerator cg, int max, Predicate p)
          Reply the Set of all objects that can be reached from the receiving Set by taking steps defined by the given ChildGenerator.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TC_LIMIT

public static final int TC_LIMIT
Constructor Detail

VectorSet

public VectorSet()

VectorSet

public VectorSet(int n)

VectorSet

public VectorSet(Object o1)
Method Detail

addElement

public void addElement(Object o)

addAllElements

public void addAllElements(Vector v)

addAllElements

public void addAllElements(Enumeration enum)

addAllElementsSuchThat

public void addAllElementsSuchThat(Enumeration enum,
                                   Predicate p)

addAllElements

public void addAllElements(VectorSet s)

addAllElementsSuchThat

public void addAllElementsSuchThat(VectorSet s,
                                   Predicate p)

remove

public void remove(Object o)

removeElement

public void removeElement(Object o)

removeAllElements

public void removeAllElements()

contains

public boolean contains(Object o)

containsSuchThat

public boolean containsSuchThat(Predicate p)

findSuchThat

public Object findSuchThat(Predicate p)
return the first element that causes p.predicate() to return true.

elements

public Enumeration elements()

elementAt

public Object elementAt(int index)

asVector

public Vector asVector()

equals

public boolean equals(Object o)
Overrides:
equals in class Object

firstElement

public Object firstElement()

size

public int size()

toString

public String toString()
Overrides:
toString in class Object

transitiveClosure

public VectorSet transitiveClosure(ChildGenerator cg)
Reply the Set of all objects that can be reached from the receiving Set by taking steps defined by the given ChildGenerator. The result includes the elements of the original Set. In order to avoid very deep searches which are often programming mistakes, only paths of length TC_LIMIT or less are considered.

reachable

public VectorSet reachable(ChildGenerator cg)
Reply the Set of all objects that can be reached from the receiving Set by taking steps defined by the given ChildGenerator. The result DOES NOT include the elements of the original Set. In order to avoid very deep searches which are often programming mistakes, only paths of length TC_LIMIT or less are considered.

reachable

public VectorSet reachable(ChildGenerator cg,
                           int max,
                           Predicate p)
Reply the Set of all objects that can be reached from the receiving Set by taking steps defined by the given ChildGenerator. The result DOES NOT include the elements of the original Set. In order to avoid very deep searches which are often programming mistakes, only paths of given max length or less are considered. Only paths consisting of elements which all cause p.predicate() to return true are considered.

transitiveClosure

public VectorSet transitiveClosure(ChildGenerator cg,
                                   int max,
                                   Predicate p)
Reply the Set of all objects that can be reached from the receiving Set by taking steps defined by the given ChildGenerator. The result includes the elements of the original Set. In order to avoid very deep searches which are often programming mistakes, only paths of given max length or less are considered. Only paths consisting of elements which all cause p.predicate() to return true are considered.