|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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 objectMethod Detail |
---|
public void Clear()
Clear
in class XPHashtable
public java.lang.Object Clone()
Clone
in class XPHashtable
public 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 IXPDictionary
ContainsKey
in class XPHashtable
key
- 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 XPHashtable
type
- the type of information in the array returned (key or value)
public java.lang.Object GetElement(java.lang.Object key)
GetElement
in interface IXPDictionary
GetElement
in class XPHashtable
key
- a key in the hashtable.
public IXPEnumerator GetElements()
GetElements
in interface IXPDictionary
GetElements
in class XPHashtable
public IXPEnumerator GetKeys()
GetKeys
in interface IXPDictionary
GetKeys
in class XPHashtable
public int GetSize()
GetSize
in interface IXPDictionary
GetSize
in class XPHashtable
public boolean IsEmpty()
IsEmpty
in class XPHashtable
public java.lang.Object PutElement(java.lang.Object key, java.lang.Object _value)
PutElement
in interface IXPDictionary
PutElement
in class XPHashtable
key
- the hashtable key._value
- the value.
public java.lang.Object RemoveElement(java.lang.Object key)
RemoveElement
in interface IXPDictionary
RemoveElement
in class XPHashtable
key
- the key that needs to be removed.
public java.util.HashMap GetUnderlyingObject()
GetUnderlyingObject
in class XPHashtable
public IXPDictionaryEnumerator GetEnumerator()
GetEnumerator
in interface IXPDictionary
GetEnumerator
in class XPHashtable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |