|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractMap
ariba.ui.aribaweb.util.AWIntKeyHashtable
public final class AWIntKeyHashtable
This code duplicated from ariba.util.core.Hashtable and is temporary until we get this capability in ariba.util.core.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.util.AbstractMap |
---|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V> |
Nested classes/interfaces inherited from interface java.util.Map |
---|
java.util.Map.Entry<K,V> |
Field Summary | |
---|---|
static java.lang.String |
ClassName
Name of this class. |
Constructor Summary | |
---|---|
AWIntKeyHashtable()
Constructs an empty Hashtable. |
|
AWIntKeyHashtable(java.util.Hashtable source)
Creates new Hashtable with the same contents as the given Hashtable. |
|
AWIntKeyHashtable(int initialCapacity)
Constructs a Hashtable capable of holding a specified number of elements. |
Method Summary | |
---|---|
void |
clear()
Removes all keys and elements from the Hashtable. |
java.lang.Object |
clone()
Creates a shallow copy of the Hashtable. |
boolean |
contains(java.lang.Object element)
Checks if the Hashtable contains the specified element. |
boolean |
containsKey(int key)
Checks if the Hashtable has an entry matching the key key. |
int |
count()
Returns the number of elements in the Hashtable. |
void |
dispose()
Disosable interface implementation |
java.util.Iterator |
elements()
Returns an Iterator of the Hashtable's elements. |
java.lang.Object[] |
elementsArray()
Returns an Object array containing the Hashtable's elements. |
java.util.List |
elementsVector()
Returns a Vector containing the Hashtable's elements. |
java.util.Set |
entrySet()
Note: While iterating through a set of entries in the Hashtable, do not keep references to Key.Entry objects after a subsequent call to next(). |
void |
fromSerializedString(java.lang.String serialized)
Populates the hashtable with serialized data from the string. |
java.lang.Object |
get(int key)
Searches the Hashtable and returns the element associated with the matched key. |
java.lang.Object |
get(java.lang.Object key)
|
boolean |
isEmpty()
Indicates if the hashtable contains any elements. |
int[] |
keysArray()
Returns an Object array containing the Hashtable's keys. |
AWArrayManager |
keysVector()
Returns a Vector containing the Hashtable's keys. |
java.lang.Object |
put(int key,
java.lang.Object element)
Places the key/element pair in the Hashtable. |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
|
java.lang.Object |
remove(int key)
Finds and removes key and the element associated with it from the Hashtable. |
int |
removeElement(java.lang.Object element)
Finds and removes all occurrences of element from the Hashtable. |
int |
size()
Returns the number of elements in the Hashtable. |
java.lang.String |
toSerializedString()
Returns a string serialization of the Hashtable using the Serializer. |
java.lang.String |
toString()
Returns the Hashtable's string representation. |
java.lang.String[] |
toStringArray()
Converts a string into a string array for persistence purposes. |
Methods inherited from class java.util.AbstractMap |
---|
containsKey, containsValue, equals, hashCode, keySet, putAll, remove, values |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ClassName
Constructor Detail |
---|
public AWIntKeyHashtable()
public AWIntKeyHashtable(int initialCapacity)
initialCapacity
- the number of elements this Hashtable
is capable of holding before needing to grow.
return new empty Hashtable with given initial capacitypublic AWIntKeyHashtable(java.util.Hashtable source)
source
- source Hashtable
return new Hashtable with same contents as source
Method Detail |
---|
public void dispose()
dispose
in interface AWDisposable
public java.lang.Object clone()
clone
in class java.util.AbstractMap
java.lang.InternalError
- if the cloning operation fails.public int count()
public int size()
size
in interface java.util.Map
size
in class java.util.AbstractMap
public boolean isEmpty()
isEmpty
in interface java.util.Map
isEmpty
in class java.util.AbstractMap
public java.util.Iterator elements()
_keys
public AWArrayManager keysVector()
public java.util.List elementsVector()
public int[] keysArray()
public java.lang.Object[] elementsArray()
public boolean contains(java.lang.Object element)
element
- the element to search for in the Hashtable
java.lang.NullPointerException
- if element is nullpublic boolean containsKey(int key)
key
- the key to search for in the Hashtable
java.lang.NullPointerException
- if key is nullpublic java.lang.Object get(int key)
key
- the key to search the hashtable's keys
for. Hashtable hashes and compares key using
hashCode() and equals().
java.lang.NullPointerException
- if key is nullpublic java.lang.Object get(java.lang.Object key)
get
in interface java.util.Map
get
in class java.util.AbstractMap
public java.lang.Object remove(int key)
key
- the key to search the hashtable's keys
for. Hashtable hashes and compares key using
hashCode() and equals().
public int removeElement(java.lang.Object element)
element
- the element to search for. Hashtable compares elements
using equals().
public java.lang.Object put(int key, java.lang.Object element)
key
- the key to place into the Hashtable; may not be
nullelement
- the element to place into the Hashtable; may
not be null
java.lang.NullPointerException
- if element or
key are nullpublic java.lang.Object put(java.lang.Object key, java.lang.Object value)
put
in interface java.util.Map
put
in class java.util.AbstractMap
public void clear()
clear
in interface java.util.Map
clear
in class java.util.AbstractMap
public java.lang.String toString()
toString
in class java.util.AbstractMap
public java.lang.String[] toStringArray()
public java.lang.String toSerializedString()
Serializer
public void fromSerializedString(java.lang.String serialized)
serialized
- String containing serialized Hashtable datapublic java.util.Set entrySet()
entrySet
in interface java.util.Map
entrySet
in class java.util.AbstractMap
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |