|
|||||||||
| 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 interface java.util.Map |
|---|
Map.Entry<K,V> |
| Field Summary | |
|---|---|
static String |
ClassName
Name of this class. |
| Constructor Summary | |
|---|---|
AWIntKeyHashtable()
Constructs an empty Hashtable. |
|
AWIntKeyHashtable(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. |
Object |
clone()
Creates a shallow copy of the Hashtable. |
boolean |
contains(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 |
Iterator |
elements()
Returns an Iterator of the Hashtable's elements. |
Object[] |
elementsArray()
Returns an Object array containing the Hashtable's elements. |
List |
elementsVector()
Returns a Vector containing the Hashtable's elements. |
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(String serialized)
Populates the hashtable with serialized data from the string. |
Object |
get(int key)
Searches the Hashtable and returns the element associated with the matched key. |
Object |
get(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. |
Object |
put(int key,
Object element)
Places the key/element pair in the Hashtable. |
Object |
put(Object key,
Object value)
|
Object |
remove(int key)
Finds and removes key and the element associated with it from the Hashtable. |
int |
removeElement(Object element)
Finds and removes all occurrences of element from the Hashtable. |
int |
size()
Returns the number of elements in the Hashtable. |
String |
toSerializedString()
Returns a string serialization of the Hashtable using the Serializer. |
String |
toString()
Returns the Hashtable's string representation. |
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 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(Hashtable source)
source - source Hashtable
return new Hashtable with same contents as source| Method Detail |
|---|
public void dispose()
dispose in interface AWDisposablepublic Object clone()
clone in class AbstractMapInternalError - if the cloning operation fails.public int count()
public int size()
size in interface Mapsize in class AbstractMappublic boolean isEmpty()
isEmpty in interface MapisEmpty in class AbstractMappublic Iterator elements()
_keyspublic AWArrayManager keysVector()
public List elementsVector()
public int[] keysArray()
public Object[] elementsArray()
public boolean contains(Object element)
element - the element to search for in the Hashtable
NullPointerException - if element is nullpublic boolean containsKey(int key)
key - the key to search for in the Hashtable
NullPointerException - if key is nullpublic Object get(int key)
key - the key to search the hashtable's keys
for. Hashtable hashes and compares key using
hashCode() and equals().
NullPointerException - if key is nullpublic Object get(Object key)
get in interface Mapget in class AbstractMappublic 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(Object element)
element - the element to search for. Hashtable compares elements
using equals().
public Object put(int key,
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
NullPointerException - if element or
key are null
public Object put(Object key,
Object value)
put in interface Mapput in class AbstractMappublic void clear()
clear in interface Mapclear in class AbstractMappublic String toString()
toString in class AbstractMappublic String[] toStringArray()
public String toSerializedString()
Serializerpublic void fromSerializedString(String serialized)
serialized - String containing serialized Hashtable datapublic Set entrySet()
entrySet in interface MapentrySet in class AbstractMap
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||