|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.plumtree.openfoundation.util.XPHashtable
com.plumtree.openfoundation.util.XPSynchronizedHashtable
public class XPSynchronizedHashtable
XPSynchronizedHashtable is a synchronized wrapper over XPHashtable.
| Field Summary | |
|---|---|
static int |
KEYS
The type argument to GetArray that denotes the key. |
static int |
VALUES
The type argument to GetArray() that denotes the value. |
| Fields inherited from class com.plumtree.openfoundation.util.XPHashtable |
|---|
hashMap |
| Constructor Summary | |
|---|---|
XPSynchronizedHashtable()
Creates a new, empty XPSynchronizedHashtable. |
|
XPSynchronizedHashtable(int capacity)
Creates a new, emtpy XPSynchronizedHashtable with the specified initial capacity. |
|
XPSynchronizedHashtable(int capacity,
float loadFactor)
Creates a new, empty hashtable with the specified initial capacity and the specified load factor. |
|
XPSynchronizedHashtable(XPHashtable ht)
Copy constructor that clones the given XPHashtable and creates XPSynchronizedHashtable. |
|
| Method Summary | |
|---|---|
void |
Clear()
Clears this hashtable so that it contains no keys. |
java.lang.Object |
Clone()
Creates a shallow copy of this hashtable. |
boolean |
Contains(java.lang.Object _value)
Tests if some key maps into the specified value in this hashtable. |
boolean |
ContainsKey(java.lang.Object key)
Tests if the specified object is a key in this hashtable. |
boolean |
ContainsValue(java.lang.Object _value)
Tests if this hashtable maps one or more keys to this value. |
java.lang.Object[] |
GetArray(int type)
Returns an array of keys or values in the hashtable as indicated by the type argument. |
java.lang.Object |
GetElement(java.lang.Object key)
Returns the value to which the specified key is mapped in this hashtable. |
IXPEnumerator |
GetElements()
Returns an XPEnumerator that can iterate through the values in this hashtable. |
IXPDictionaryEnumerator |
GetEnumerator()
Return a non-synchronized enumerator over the elements of the underlying XPHashtable per the common behavior of Java and C#. |
IXPEnumerator |
GetKeys()
Returns an XPEnumerator that can iterate through the keys in this hashtable. |
int |
GetSize()
Returns the number of elements in this hashtable. |
java.util.HashMap |
GetUnderlyingObject()
Returns the platfrom specific object that this class wraps. |
boolean |
IsEmpty()
Tests if this hashtable has no elements. |
java.lang.Object |
PutElement(java.lang.Object key,
java.lang.Object _value)
Maps the specified key to the specified value in this hashtable. |
java.lang.Object |
RemoveElement(java.lang.Object key)
Removes the key (and its corresponding value) from this hashtable. |
| Methods inherited from class com.plumtree.openfoundation.util.XPHashtable |
|---|
GetSynchronized |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int KEYS
public static final int VALUES
| Constructor Detail |
|---|
public XPSynchronizedHashtable()
public XPSynchronizedHashtable(int capacity)
capacity - the initial capacity of the list.
public XPSynchronizedHashtable(int capacity,
float loadFactor)
capacity - the initial capactity of the hashtable.loadFactor - the load factor of the hashtable.public XPSynchronizedHashtable(XPHashtable ht)
ht - the XPHashtable to be copied into this object| Method Detail |
|---|
public void Clear()
Clear in class XPHashtablepublic java.lang.Object Clone()
Clone in class XPHashtablepublic boolean Contains(java.lang.Object _value)
Contains in class XPHashtable_value - a value to search for.
public boolean ContainsKey(java.lang.Object key)
ContainsKey in interface IXPDictionaryContainsKey in class XPHashtablekey - possible key.
public boolean ContainsValue(java.lang.Object _value)
ContainsValue in class XPHashtable_value - value whose presence in this hashtable is to be tested.
public java.lang.Object[] GetArray(int type)
GetArray in class XPHashtabletype - the type of information in the array returned (key or value)
public java.lang.Object GetElement(java.lang.Object key)
GetElement in interface IXPDictionaryGetElement in class XPHashtablekey - a key in the hashtable.
public IXPEnumerator GetElements()
GetElements in interface IXPDictionaryGetElements in class XPHashtablepublic IXPEnumerator GetKeys()
GetKeys in interface IXPDictionaryGetKeys in class XPHashtablepublic int GetSize()
GetSize in interface IXPDictionaryGetSize in class XPHashtablepublic boolean IsEmpty()
IsEmpty in class XPHashtable
public java.lang.Object PutElement(java.lang.Object key,
java.lang.Object _value)
PutElement in interface IXPDictionaryPutElement in class XPHashtablekey - the hashtable key._value - the value.
public java.lang.Object RemoveElement(java.lang.Object key)
RemoveElement in interface IXPDictionaryRemoveElement in class XPHashtablekey - the key that needs to be removed.
public java.util.HashMap GetUnderlyingObject()
GetUnderlyingObject in class XPHashtablepublic IXPDictionaryEnumerator GetEnumerator()
GetEnumerator in interface IXPDictionaryGetEnumerator in class XPHashtable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||