|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.nitido.util.OpenAttributeHash
public class OpenAttributeHash
An open implementation of a hashtable where all contents are serializable and all of the keys are String objects.
Constructor Summary | |
---|---|
OpenAttributeHash()
Constructs a new, empty OpenAttributeHash |
|
OpenAttributeHash(java.util.Hashtable hash)
Constructs a new OpenAttributeHash, copying the contents of the passed in Hashtable object into the OpenAttributeHash. |
|
OpenAttributeHash(OpenHash hash)
Constructs a new OpenAttributeHash, copying the contents of the passed in OpenHash object into the OpenAttributeHash. |
Method Summary | |
---|---|
void |
clear()
This method removes all entries from the hashtable. |
boolean |
containsKey(java.lang.String key)
Returns true if this OpenAttributeHash contains a key equal to the one passed in. |
boolean |
containsValue(java.io.Serializable value)
Returns true if this OpenAttributeHash contains the given value |
boolean |
containsValue(java.lang.String key,
java.io.Serializable value)
Returns true if this OpenAttributeHash contains the given value with the given key |
java.io.Serializable |
get(java.lang.String key)
This method retrieves the first value which corresponds to the key given, or null if no value is mapped to that key. |
java.util.Enumeration |
getKeys()
Returns an Enumeration of all of the keys in this OpenAttributeHash |
java.util.Enumeration |
getValues(java.lang.String key)
Returns an enumeration of values for the given key. |
java.util.Enumeration |
keys()
Convenience alias to getKeys() for Hashtable users. |
static void |
main(java.lang.String[] args)
This method is provided as a test harness for this class |
void |
put(java.lang.String key,
java.io.Serializable value)
This method maps a key to a value in the hashtable. |
java.util.Vector |
remove(java.lang.String key)
Removes all the values that are associated with the given key. |
java.io.Serializable |
remove(java.lang.String key,
java.io.Serializable value)
Removes the key/value pair specified. |
int |
size()
Returns the number of keys in this OpenAttributeHash |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public OpenAttributeHash()
public OpenAttributeHash(java.util.Hashtable hash)
hash
- The Hashtable whose contents are copied into this
OpenAttributeHashpublic OpenAttributeHash(OpenHash hash)
hash
- The Hashtable whose contents are copied into this
OpenAttributeHashMethod Detail |
---|
public java.io.Serializable get(java.lang.String key)
key
- A key in the hashtable
public java.util.Enumeration getKeys()
public java.util.Enumeration keys()
public java.util.Enumeration getValues(java.lang.String key)
key
- A key in the hashtable
public boolean containsValue(java.io.Serializable value)
value
- The value to check for in this OpenAttributeHash.
public boolean containsValue(java.lang.String key, java.io.Serializable value)
key
- The key to search for in this OpenAttributeHash.value
- The value to search for in this OpenAttributeHash.
public boolean containsKey(java.lang.String key)
key
- The key to check.
public int size()
public void put(java.lang.String key, java.io.Serializable value)
key
- The object to be used as a key in the mappingvalue
- The object which the key is being mapped to.public java.util.Vector remove(java.lang.String key)
key
- the key to be removed
public java.io.Serializable remove(java.lang.String key, java.io.Serializable value)
key
- The key in the key/value pair to remove.value
- The value in the key/value pair to remove.
public void clear()
public java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] args)
args
- Command line arguments are ignored.
|
Nitido NiM 2.5 Java API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1999-2009 Nitido Inc. Proprietary and Confidential. All Rights Reserved.