com.starbase.util.collections
Class HashtableKeySet

java.lang.Object
  |
  +--com.starbase.util.collections.HashtableKeySet
All Implemented Interfaces:
Collection, Set

public class HashtableKeySet
extends java.lang.Object
implements Set

This class wraps a Set implementation on the keys of an underlying hash table.


Constructor Summary
HashtableKeySet(java.util.Hashtable table)
          Creates a new Set of the keys found in the specified hash table.
 
Method Summary
 boolean add(java.lang.Object o)
          Unsupported operation.
 boolean addAll(Collection c)
          Unsupported operation.
 void clear()
          Unsupported operation.
 boolean contains(java.lang.Object o)
          Returns true if the set contains the specified object.
 boolean containsAll(Collection c)
          Returns true is this set contains all the elements of the specified set.
 boolean equals(java.lang.Object o)
          Returns true if the specified argument is equal to this set.
 int hashCode()
          Returns a hash code for this set.
 boolean isEmpty()
          Returns true if the set is empty.
 Iterator iterator()
          Returns an iterator for the set.
 boolean remove(java.lang.Object o)
          Unsupported operation.
 boolean removeAll(Collection c)
          Unsupported operation.
 boolean retainAll(Collection c)
          Unsupported operation.
 int size()
          Returns the size of the set.
 java.lang.Object[] toArray()
          This is currently not implemented and will throw an exception if called.
 java.lang.Object[] toArray(java.lang.Object[] a)
          This is currently not implemented and will throw an exception if called.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HashtableKeySet

public HashtableKeySet(java.util.Hashtable table)
Creates a new Set of the keys found in the specified hash table.

Parameters:
table - the underlying Hashtable for this set.
Method Detail

size

public int size()
Returns the size of the set.

Specified by:
size in interface Set
Returns:
the size of the set.

isEmpty

public boolean isEmpty()
Returns true if the set is empty.

Specified by:
isEmpty in interface Set
Returns:
true if the set is empty.

contains

public boolean contains(java.lang.Object o)
Returns true if the set contains the specified object.

Specified by:
contains in interface Set
Parameters:
o - the object to be tested for containment.
Returns:
true if the set contains the specified object.

iterator

public Iterator iterator()
Returns an iterator for the set. This returns an EnumerationIterator implementation.

Specified by:
iterator in interface Set
Returns:
an iterator for the set.
See Also:
EnumerationIterator

toArray

public java.lang.Object[] toArray(java.lang.Object[] a)
This is currently not implemented and will throw an exception if called.

Specified by:
toArray in interface Set
Parameters:
a - the array in to which the elements will be stored (if big enough)
Returns:
an array of all the elements in the set.

toArray

public java.lang.Object[] toArray()
This is currently not implemented and will throw an exception if called.

Specified by:
toArray in interface Set
Returns:
a new array of elements from the set.

containsAll

public boolean containsAll(Collection c)
Returns true is this set contains all the elements of the specified set.

Specified by:
containsAll in interface Set
Parameters:
c - the collection to be checked
Returns:
true if all the elements of the specified set are contained in this set.

equals

public boolean equals(java.lang.Object o)
Returns true if the specified argument is equal to this set.

Specified by:
equals in interface Set
Overrides:
equals in class java.lang.Object
Parameters:
o - the object to be compared for equality
Returns:
true if the specified argument is equal to this set.

hashCode

public int hashCode()
Returns a hash code for this set.

Specified by:
hashCode in interface Set
Overrides:
hashCode in class java.lang.Object
Returns:
a hash code for this set.

add

public boolean add(java.lang.Object o)
Unsupported operation. Will throw an exception if called.

Specified by:
add in interface Set
Parameters:
o - the element to add to the set
Returns:
true if the set was modified

addAll

public boolean addAll(Collection c)
Unsupported operation. Will throw an exception if called.

Specified by:
addAll in interface Set
Parameters:
c - the collection from which elements are added
Returns:
true if this set was modified

remove

public boolean remove(java.lang.Object o)
Unsupported operation. Will throw an exception if called.

Specified by:
remove in interface Set
Parameters:
o - the element to remove from the set
Returns:
true if the set was modified

removeAll

public boolean removeAll(Collection c)
Unsupported operation. Will throw an exception if called.

Specified by:
removeAll in interface Set
Parameters:
c - the elements to be removed from this set
Returns:
true if this set was modified

retainAll

public boolean retainAll(Collection c)
Unsupported operation. Will throw an exception if called.

Specified by:
retainAll in interface Set
Parameters:
c - the elements to be retained for this set
Returns:
true if this set was modified

clear

public void clear()
Unsupported operation. Will throw an exception if called.

Specified by:
clear in interface Set


StarTeam SDK 10.4, Build 36
Copyright © 2003-2008 Borland Software Corporation. All rights reserved.