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
TC_LIMIT
public static final int TC_LIMIT
VectorSet
public VectorSet()
VectorSet
public VectorSet(int n)
VectorSet
public VectorSet(Object o1)
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.