|
Framework Professional Edition Package |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.Dictionary
com.prosyst.util.io.ExternalizableDictionary
public class ExternalizableDictionary
This class implements a hashtable, which serves the needs of ConfigurationManagement of capsulation of configuration properties with String keys, which are case insentive at lookup (at get, remove, put operations) but preserve the last case of keys. The implementaion of the Externalizable interface allows remote transfer of those properties.
| Field Summary |
|---|
| Fields inherited from interface com.prosyst.util.io.Remote |
|---|
AUTHORIZED_ROLES |
| Constructor Summary | |
|---|---|
ExternalizableDictionary()
Constructs a new, empty dictionary with a default capacity and load factor. |
|
ExternalizableDictionary(int initialCapacity)
Constructs a new, empty dictionary with the wanted capacity and default load factor. |
|
ExternalizableDictionary(int initialCapacity,
float loadFactor)
Constructs a new, empty dictionary with the specified initial capacity and the specified load factor. |
|
| Method Summary | |
|---|---|
void |
clear()
Clears all elements from the distionary. |
java.lang.Object |
clone()
Creates a shallow copy of this hashtable. |
void |
copyFrom(java.util.Dictionary props)
|
java.util.Enumeration |
elements()
Gets an enumeration with dictionary's values. |
boolean |
equals(java.lang.Object o)
Compares the specified Object with this Dictionary for equality, |
java.lang.Object |
get(java.lang.Object key)
Gets the value corresponding to this key or any of its case representations. |
boolean |
isEmpty()
Checks if there is any element in the dictionary. |
java.util.Enumeration |
keys()
Gets an enumeration with dictionary's keys. |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
Puts the key and the value in the table. |
void |
readObject(java.io.InputStream is)
Reads the data from the InputStream and loads the data in the table. |
protected void |
rehash()
|
java.lang.Class[] |
remoteInterfaces()
Returns the interfaces/classes that contain the methods that can be invoked remotely. |
java.lang.Object |
remove(java.lang.Object key)
Removes the key and its corresponding value. |
java.lang.ClassLoader |
setClassLaoder(java.lang.ClassLoader loader)
|
java.lang.ClassLoader |
setClassLoader(java.lang.ClassLoader loader)
|
int |
size()
Gets the size of the elements in the dictionary. |
java.lang.String |
toString()
Makes a string represntation of this object. |
void |
writeObject(java.io.OutputStream os)
Writes this object to the stream passed. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ExternalizableDictionary(int initialCapacity,
float loadFactor)
initialCapacity - the initial capacity of the hashtable.
when 0 is passed for capacity, minimum possible capacity is used;
i.e. when the object is read as externalizable, then the table is
created with the written size.loadFactor - a number between 0.0 and 1.0.
java.lang.IllegalArgumentException - if the initial capacity is less
than zero, or if the load factor is less than
or equal to zero.public ExternalizableDictionary(int initialCapacity)
public ExternalizableDictionary()
| Method Detail |
|---|
public java.lang.ClassLoader setClassLaoder(java.lang.ClassLoader loader)
public java.lang.ClassLoader setClassLoader(java.lang.ClassLoader loader)
public java.lang.Class[] remoteInterfaces()
Remote
remoteInterfaces in interface Remotepublic int size()
size in class java.util.Dictionarypublic boolean isEmpty()
isEmpty in class java.util.Dictionarypublic java.util.Enumeration keys()
keys in class java.util.Dictionarypublic java.util.Enumeration elements()
elements in class java.util.Dictionarypublic java.lang.Object get(java.lang.Object key)
get in class java.util.Dictionarykey - String key
protected void rehash()
public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
throws java.lang.IllegalArgumentException
put in class java.util.Dictionarykey - String keyvalue - object to put
java.lang.IllegalArgumentException - if key is not a string
public java.lang.Object remove(java.lang.Object key)
throws java.lang.IllegalArgumentException
remove in class java.util.Dictionarykey - string key
java.lang.IllegalArgumentException - if key is not s stringpublic void clear()
public java.lang.Object clone()
clone in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
public void writeObject(java.io.OutputStream os)
throws java.lang.Exception
writeObject in interface Externalizableos - strream to write data to.
java.lang.Exception - if error of any kind occurs
public void readObject(java.io.InputStream is)
throws java.lang.Exception
readObject in interface Externalizableis - stream to read dictionary's data from
java.lang.Exception - if an error of any kind occurs while reading
public void copyFrom(java.util.Dictionary props)
throws java.lang.IllegalArgumentException
props -
java.lang.IllegalArgumentException
|
Framework Professional Edition Package |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||