Java Dictionary class
Dictionary class is an abstract class that is used to store key / value pairs, similar to a class action and Map.
Given keys and values, you can store the value in a Dictionary object. Once the value is stored, you can use it to get the key to it. Map and so, like, Dictionary also be used as a key / value pairs.
Dictionary abstract methods defined in the following table:
No. | Method Description |
1 | Enumeration elements () Returns dictionary enumeration values. |
2 | Object get (Object key) Returns this dictionary in which the key is mapped to values. |
3 | boolean isEmpty () Test this dictionary is mapped to the key value does not exist. |
4 | Enumeration keys () Returns an enumeration of the dictionary keys. |
5 | Object put (Object key, Object value ) Maps the specified key in this dictionary specified value. |
6 | Object remove (Object key) Removes from this dictionary key (and its corresponding value). |
7 | int size () Returns the dictionary entries (distinct keys) number. |
Dictionary class is obsolete. In the actual development, you can implement the Map interface to obtain the storage function keys / values.