public class ExternalizableDictionary extends java.util.Dictionary implements Externalizable, java.lang.Cloneable, Remote
Externalizable interface allows remote transfer
of those properties.AUTHORIZED_ROLES| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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)
Copies the keys and the values from the specified dictionary
|
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)
Deprecated.
|
java.lang.ClassLoader |
setClassLoader(java.lang.ClassLoader loader)
Sets the class loader used to load
Externalizable objects. |
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.
|
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)
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.public ExternalizableDictionary()
public java.lang.ClassLoader setClassLaoder(java.lang.ClassLoader loader)
setClassLoader(ClassLoader)Externalizable objects.loader - the class loadernull if it wasn't setpublic java.lang.ClassLoader setClassLoader(java.lang.ClassLoader loader)
Externalizable objects.loader - the class loadernull if it wasn't setpublic java.lang.Class[] remoteInterfaces()
RemoteremoteInterfaces 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 keyprotected 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 putjava.lang.IllegalArgumentException - if key is not a stringpublic java.lang.Object remove(java.lang.Object key)
throws java.lang.IllegalArgumentException
remove in class java.util.Dictionarykey - string keyjava.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.ObjectObject.equals(java.lang.Object)public java.lang.String toString()
toString in class java.lang.Objectpublic 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 occurspublic void readObject(java.io.InputStream is)
throws java.lang.Exception
readObject in interface Externalizableis - stream to read dictionary's data fromjava.lang.Exception - if an error of any kind occurs while readingpublic void copyFrom(java.util.Dictionary props)
throws java.lang.IllegalArgumentException
props - the key-value pairs to copy to the current dictionary.java.lang.IllegalArgumentException - if found any key, that is not
String or the value is not supported.Copyright © 2019 Bosch Software Innovations GmbH. All Rights Reserved.