Collections

java.util
Class Vector<E>

Method Summary
 boolean add(E o)
          Appends the specified element to the end of this Vector.
 void add(int index, E element)
          Inserts the specified element at the specified position in this Vector.
 int capacity()
          Returns the current capacity of this vector.
 void clear()
          Removes all of the elements from this Vector.
 Object clone()
          Returns a clone of this vector.
 boolean contains(Object elem)
          Tests if the specified object is a component in this vector.
 E elementAt(int index)
          Returns the component at the specified index.
 int indexOf(Object elem)
          Searches for the first occurence of the given argument, testing for equality using the equals method.
 int indexOf(Object elem, int index)
          Searches for the first occurence of the given argument, beginning the search at index, and testing for equality using the equals method.
 void insertElementAt(E obj, int index)
          Inserts the specified object as a component in this vector at the specified index.
 boolean isEmpty()
          Tests if this vector has no components.
 Iterator<E> iterator()
          Returns an iterator over the elements in this list in proper sequence.
 E remove(int index)
          Removes the element at the specified position in this Vector.
 boolean remove(Object o)
          Removes the first occurrence of the specified element in this Vector If the Vector does not contain the element, it is unchanged.
 boolean removeAll(Collection<?> c)
          Removes from this Vector all of its elements that are contained in the specified Collection.
 boolean removeElement(Object obj)
          Removes the first (lowest-indexed) occurrence of the argument from this vector.
 void removeElementAt(int index)
          Deletes the component at the specified index.
protected  void removeRange(int fromIndex, int toIndex)
          Removes from this List all of the elements whose index is between fromIndex, inclusive and toIndex, exclusive.
 void setElementAt(E obj, int index)
          Sets the component at the specified index of this vector to be the specified object.
 int size()
          Returns the number of components in this vector.
 Object[] toArray()
          Returns an array containing all of the elements in this Vector in the correct order.
 void trimToSize()
          Trims the capacity of this vector to be the vector's current size.

java.util
Class HashSet<E>

Method Summary
 boolean add(E o)
          Adds the specified element to this set if it is not already present.
 void clear()
          Removes all of the elements from this set.
 Object clone()
          Returns a shallow copy of this HashSet instance: the elements themselves are not cloned.
 boolean contains(Object o)
          Returns true if this set contains the specified element.
 boolean isEmpty()
          Returns true if this set contains no elements.
 Iterator<E> iterator()
          Returns an iterator over the elements in this set.
 boolean remove(Object o)
          Removes the specified element from this set if it is present.
 int size()
          Returns the number of elements in this set (its cardinality).

java.util
Class HashMap<K,V>

Method Summary
 void clear()
          Removes all mappings from this map.
 Object clone()
          Returns a shallow copy of this HashMap instance: the keys and values themselves are not cloned.
 boolean containsKey(Object key)
          Returns true if this map contains a mapping for the specified key.
 boolean containsValue(Object value)
          Returns true if this map maps one or more keys to the specified value.
 V get(Object key)
          Returns the value to which the specified key is mapped in this identity hash map, or null if the map contains no mapping for this key.
 boolean isEmpty()
          Returns true if this map contains no key-value mappings.
 Set<K> keySet()
          Returns a set view of the keys contained in this map.
 V put(K key, V value)
          Associates the specified value with the specified key in this map.
 V remove(Object key)
          Removes the mapping for this key from this map if present.
 int size()
          Returns the number of key-value mappings in this map.

java.util
Interface Iterator<E>

Method Summary
 boolean hasNext()
          Returns true if the iteration has more elements.
 E next()
          Returns the next element in the iteration.
 void remove()
          Removes from the underlying collection the last element returned by the iterator (optional operation).
 


Thomas VanDrunen
Last modified: Fri Nov 10 16:05:45 CST 2006