jumbo.euclid
Class HashedVector

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--java.util.Vector
                    |
                    +--jumbo.euclid.HashedVector

public class HashedVector
extends java.util.Vector

A Vector whose elements are hashed via an internal Hashtable (StringSet)

See Also:
Serialized Form

Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
HashedVector()
           
HashedVector(int ignoreCase)
          HashedVector will have case-sensitive keying unless ignoreCase is StringSet.IGNORE_CASE
 
Method Summary
 boolean addElement(java.lang.String key, java.lang.Object object)
          add Object using key (default case-sensitive).
 HashedVector andIn(HashedVector h2)
          get elements common to both sets (crude and slow)
 boolean containsObjectWithKey(java.lang.String key)
          has key been used to store an object?
 java.lang.Object getObject(java.lang.String key)
          return object with key key, else null
 StringSet getStringSet()
          return set of all keys (often the names of objects)
 int indexOf(java.lang.String key)
          serial number of object with key, else -1
 HashedVector notIn(HashedVector h2)
          get elements NOT in second Set (crude and slow)
 HashedVector orIn(HashedVector h2)
          get elements in either set (crude and slow)
 HashedVector xorIn(HashedVector h2)
          get elements in not more than one set (crude and slow)
 
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

HashedVector

public HashedVector()

HashedVector

public HashedVector(int ignoreCase)
HashedVector will have case-sensitive keying unless ignoreCase is StringSet.IGNORE_CASE
Method Detail

addElement

public boolean addElement(java.lang.String key,
                          java.lang.Object object)
add Object using key (default case-sensitive). Returns false if key already used.

getStringSet

public StringSet getStringSet()
return set of all keys (often the names of objects)

containsObjectWithKey

public boolean containsObjectWithKey(java.lang.String key)
has key been used to store an object?

indexOf

public int indexOf(java.lang.String key)
serial number of object with key, else -1

getObject

public java.lang.Object getObject(java.lang.String key)
return object with key key, else null

notIn

public HashedVector notIn(HashedVector h2)
get elements NOT in second Set (crude and slow)

andIn

public HashedVector andIn(HashedVector h2)
get elements common to both sets (crude and slow)

orIn

public HashedVector orIn(HashedVector h2)
get elements in either set (crude and slow)

xorIn

public HashedVector xorIn(HashedVector h2)
get elements in not more than one set (crude and slow)