|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.util.Dictionary
|
+--com.ibm.dse.applsrv.aa.Dictionary
General dictionary class.
| Constructor Summary | |
Dictionary()
|
|
Dictionary(int initialCapacity)
|
|
Dictionary(int initialCapacity,
float loadFactor)
Constructs a new, empty dictionary with the specified initial capacity and the specified load factor. |
|
Dictionary(java.lang.Object key,
boolean value)
Create and return a dictionary initialized to one key/value pair. |
|
Dictionary(java.lang.Object key,
int value)
Create and return a dictionary initialized to one key/value pair. |
|
Dictionary(java.lang.Object key1,
int value1,
java.lang.Object key2,
int value2)
Create and return a dictionary initialized to two key/value pairs. |
|
Dictionary(java.lang.Object key,
java.lang.Object value)
Create and return a dictionary initialized to one key/value pair. |
|
Dictionary(java.lang.Object key1,
java.lang.Object value1,
java.lang.Object key2,
java.lang.Object value2)
Create and return a dictionary initialized to two key/value pairs. |
|
| Method Summary | |
void |
add(java.lang.Object key,
boolean value)
Add a key with a boolean value to this dictionary. |
void |
add(java.lang.Object key,
java.lang.Object value)
Adds the specified value to this dictionary associated with the specified key. |
void |
addAll(java.util.Dictionary d)
Add all of the entries in the specified dictionary into the current dictionary. |
void |
addAll(java.lang.String[] v)
Add all of the entries in the specified list into the current dictionary. |
void |
addnn(java.lang.Object key,
java.lang.Object value)
Adds the specified value to this dictionary associated with the specified key. |
void |
append(java.lang.Object key,
java.lang.String value)
Appended the specified value to an existing value for the same key. |
java.util.Hashtable |
asHashtable()
Return a copy of this dictionary as a Hashtable. |
java.lang.String |
asList()
Returns a rather long string representation of this dictionary. |
static java.lang.String |
asList(Dictionary dictionary)
Return a string representation of the specified dictionary. |
java.lang.Object |
at(java.lang.Object key)
Returns the value associated with the specified key. |
void |
clear()
Clears this dictionary so that it contains no keys. |
java.lang.Object |
clone()
Creates a shallow copy of this dictionary. |
boolean |
contains(java.lang.Object value)
Tests if some key maps into the specified value in this dictionary. |
boolean |
containsKey(java.lang.Object key)
Tests if the specified object is a key in this dictionary. |
Dictionary |
copy()
Return a copy of this dictionary. |
static Dictionary |
copy(Dictionary aDictionary)
Return a copy of the specified dictionary or null if the argument is null. |
java.util.Enumeration |
elements()
Returns an enumeration of the values in this dictionary. |
java.util.Enumeration |
enum()
Returns an enumeration of the values in this dictionary. |
static Dictionary |
from(java.util.Dictionary dictionary)
Create and return a dictionary consisting of all the elements of the specified dictionary. |
static Dictionary |
from(java.lang.String s)
Create and return a dictionary based on the argument string which is expected to be of the format: "key1=value1 key2=value2 ... |
static Dictionary |
from(java.lang.String[] v)
Create and return a dictionary based on the alternating keys & values in the specified list. |
java.lang.Object |
get(java.lang.Object key)
Returns the value associated with the specified key. |
java.lang.Object |
get(java.lang.Object key,
java.lang.Object defaultValue)
Returns the value associated with the specified key or the default value if the key is not found. |
boolean |
isEmpty()
Checks if this dictionary is empty. |
java.util.Enumeration |
keys()
Returns an enumeration of the keys in this dictionary. |
Array |
keysAsArray()
Returns an array of the keys in this dictionary. |
java.lang.String[] |
keysAsStrings()
Returns the keys of this dictionary as an array of string - of course the keys actually have to be string for this method to work. |
Array |
keysForValue(java.lang.Object value)
Return a list of keys who's values are equal to the specified value. |
void |
load(java.lang.String s)
Fill this dictionary with key-value pairs based on the argument string which is expected to be of the format: "key1=value1 key2=value2 ... |
java.lang.Object |
put(java.lang.Object key,
boolean value)
Add a key with a boolean value to this dictionary. |
java.lang.Object |
put(java.lang.Object key,
char value)
Add a key with a character value to this dictionary. |
java.lang.Object |
put(java.lang.Object key,
int value)
Add a key with a integer value to this dictionary. |
java.lang.Object |
put(java.lang.Object key,
long value)
Add a key with a long integer value to this dictionary. |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
Adds the specified value to this dictionary associated with the specified key. |
protected void |
rehash()
Rehashes the contents of this dictionary into a dictionary with a larger capacity. |
java.lang.Object |
remove(java.lang.Object key)
Removes the key (and its corresponding value) from this dictionary. |
void |
set(java.util.Dictionary d)
Set the contents of this dictionary to be the same as the contents of the specified dictionary. |
void |
set(java.lang.Object key,
java.lang.Object value)
Set the contents of this dictionary to be the single specified key/value pair. |
int |
size()
Return the size (i.e. |
java.lang.String |
toString()
Returns a rather long string representation of this dictionary. |
java.lang.Object[] |
values()
Returns the values of this dictionary as an object array. |
| Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Constructor Detail |
public Dictionary()
public Dictionary(int initialCapacity)
initialCapacity - int
public Dictionary(int initialCapacity,
float loadFactor)
initialCapacity - int - the initial capacity of the dictionary.loadFactor - float - a number between 0.0 and 1.0.
public Dictionary(java.lang.Object key,
int value)
key - Object - the new key.value - int - the corresponding value.
public Dictionary(java.lang.Object key1,
int value1,
java.lang.Object key2,
int value2)
key1 - Object - the first key.value1 - int - the corresponding value.key2 - Object - the second key.value2 - int - the corresponding value.
public Dictionary(java.lang.Object key,
java.lang.Object value)
key - Object - the new key.value - Object - the corresponding value.
public Dictionary(java.lang.Object key1,
java.lang.Object value1,
java.lang.Object key2,
java.lang.Object value2)
key1 - Object - the first key.value1 - Object - the corresponding value.key2 - Object - the second key.value2 - Object - the corresponding value.
public Dictionary(java.lang.Object key,
boolean value)
key - Object - the new key.value - boolean - the corresponding value.| Method Detail |
public void add(java.lang.Object key,
java.lang.Object value)
key - Object - the search key.value - Object - the associated value.null.
public void add(java.lang.Object key,
boolean value)
key - Object - the dictionary key.value - boolean - the boolean value.null.public void addAll(java.lang.String[] v)
v - String[] - the key/value pairs to load.public void addAll(java.util.Dictionary d)
d - Dictionary - the dictionary to load.
public void addnn(java.lang.Object key,
java.lang.Object value)
key - Object - the search key.value - Object - the associated value.
public void append(java.lang.Object key,
java.lang.String value)
key - Object - the search key.value - String - the value to append.null.public java.util.Hashtable asHashtable()
public java.lang.String asList()
public static java.lang.String asList(Dictionary dictionary)
dictionary - Dictionary - the dictionary to enlist.public java.lang.Object at(java.lang.Object key)
key - Object - the search key.null.public void clear()
public java.lang.Object clone()
public boolean contains(java.lang.Object value)
containsKey method.Object - value - a value to search for.true if some key maps to the value argument in this dictionary; false otherwise.null.public boolean containsKey(java.lang.Object key)
Object - key - a key to search for.true if the key is found; false otherwise.null.public Dictionary copy()
public static Dictionary copy(Dictionary aDictionary)
aDictionary - Dictionary - the dictionary to copy or null.public java.util.Enumeration elements()
public java.util.Enumeration enum()
public static Dictionary from(java.lang.String[] v)
v - String[] - the list of key/value pairs.public static Dictionary from(java.lang.String s)
s - String - the string to parse.public static Dictionary from(java.util.Dictionary dictionary)
dictionary - java.util.Dictionary - the dictionary to read.public java.lang.Object get(java.lang.Object key)
key - Object - the search key.null.
public java.lang.Object get(java.lang.Object key,
java.lang.Object defaultValue)
key - Object - the search key.defaultValue - Object - the default value.null.public boolean isEmpty()
public java.util.Enumeration keys()
public Array keysAsArray()
public java.lang.String[] keysAsStrings()
public Array keysForValue(java.lang.Object value)
public void load(java.lang.String s)
s - String - the string to parse.
public java.lang.Object put(java.lang.Object key,
char value)
key - Object - the dictionary key.value - char - the character value.null if it did not have one.null.
public java.lang.Object put(java.lang.Object key,
int value)
key - Object - the dictionary key.value - int - the integer value.null if it did not have one.null.
public java.lang.Object put(java.lang.Object key,
long value)
key - Object - the dictionary key.value - long - the long integer value.null if it did not have one.null.
public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
key - Object - the search key.value - Object - the associated value.null.
public java.lang.Object put(java.lang.Object key,
boolean value)
key - Object - the dictionary key.value - boolean - the boolean value.null if it did not have one.null.protected void rehash()
public java.lang.Object remove(java.lang.Object key)
key - Object - the key to be removed.null.
public void set(java.lang.Object key,
java.lang.Object value)
key - Object - the new key.value - Object - the corresponding value.public void set(java.util.Dictionary d)
d - java.util.Dictionary - the hash table to load.public int size()
public java.lang.String toString()
public java.lang.Object[] values()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||