|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.AbstractCollection | +--java.util.AbstractList | +--java.util.Vector | +--SetVector
Vector with set operations union and intersect; only use with small vectors, as in storing unification values. Does not currently enforce "no duplicates", except that union and intersect do not introduce dups if each set has no dups.
Field Summary | |
private static java.util.Hashtable |
h
|
Fields inherited from class java.util.Vector |
capacityIncrement,
elementCount,
elementData,
serialVersionUID |
Fields inherited from class java.util.AbstractList |
modCount |
Constructor Summary | |
SetVector()
Constructs an empty vector. |
|
SetVector(int initialCapacity)
Constructs an empty vector with the specified initial capacity. |
|
SetVector(int initialCapacity,
int capacityIncrement)
Constructs an empty SetVector with the specified initial capacity and capacity increment. |
Method Summary | |
void |
addElementUniquely(java.lang.Object o)
|
static void |
main(java.lang.String[] args)
|
SetVector |
union(java.util.Vector v)
|
Methods inherited from class java.util.Vector |
add,
add,
addAll,
addAll,
addElement,
capacity,
clear,
clone,
contains,
containsAll,
copyInto,
elementAt,
elements,
ensureCapacity,
ensureCapacityHelper,
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 |
|
Field Detail |
private static java.util.Hashtable h
Constructor Detail |
public SetVector(int initialCapacity, int capacityIncrement)
initialCapacity
- the initial capacity of the vector.capacityIncrement
- the amount by which the capacity is
increased when the vector overflows.public SetVector(int initialCapacity)
initialCapacity
- the initial capacity of the vector.public SetVector()
Method Detail |
public void addElementUniquely(java.lang.Object o)
public SetVector union(java.util.Vector v)
public static void main(java.lang.String[] args)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |