| Library | Package | Frames | Expand | Java Toolkit |
| Method Summary | |
|---|---|
| boolean | contains
(String key)
|
| static booleandict | create
()
Creates a new empty dictionary. |
| boolean | find
(String key)
Finds an element with the specified key in the dictionary. If an element is found, returns xtrue and sets the value pointer to point to the found value, otherwise returns xfalse. If the value pointer is 0, this method only verifies if an element with the specified key exists in the dictionary without returning its value. |
| boolean | getbyindex
(int idx)
Gets the value of an element with the specified index from a dictionary. If an element is found, returns yxtrue and sets the value pointer to point to the found value, otherwise returns xfalse. If the value pointer is 0, this method only verifies if an element with the specified index exists in the dictionary without returning its value. Use this method together with methods getmapsize and getkeybyindex to iterate through the dictionary. |
| int | getcount
()
|
| String | getkeybyindex
(int idx)
Gets the key of an element with the specified index from a dictionary. If an element is found, returns xtrue and sets the key pointer to point to the found string value, otherwise returns xfalse. If the key pointer is 0, this method only verifies if an element with the specified index exists in the dictionary without returning its key. Use this method together with methods getmapsize and getbyindex to iterate through the dictionary. |
| int | getmapsize
()
Returns the dictionary size. This size can be greater than the current number of elements in the dictionary, in fact this is a size of the dictionary hashtable. |
| void | remove
(String key)
Removes an element with the specified key from a dictionary. |
| void | removebyindex
(int idx)
Removes an element with the specified index from a dictionary. If an element with this index does not exist in the dictionary, throws exception cipXInvalidDictIndex. |
| void | set
(String key, boolean value)
Assigns a new value to the dictionary element with the specified key, if such an element exists, otherwise adds a new element with the given key and value to the dictionary. |
| void | setbyindex
(int idx, boolean value)
Changes the value of a dictionary element with the specified index to the specified value. If an element with the specified index does not exist in the dictionary, throws exception cipXInvalidDictIndex. |
| Method Detail |
|---|
| getmapsize |
|---|
| int | getmapsize | () |
Returns the dictionary size. This size can be greater than the current number of elements in the dictionary, in fact this is a size of the dictionary hashtable.
|
| getcount |
|---|
| int | getcount | () |
|
| contains |
|---|
| boolean | contains | (String key) |
|
| find |
|---|
| boolean | find | (String key) |
Finds an element with the specified key in the dictionary. If an element is found, returns xtrue and sets the value pointer to point to the found value, otherwise returns xfalse. If the value pointer is 0, this method only verifies if an element with the specified key exists in the dictionary without returning its value.
|
| set |
|---|
| void | set | (String key, boolean value) |
Assigns a new value to the dictionary element with the specified key, if such an element exists, otherwise adds a new element with the given key and value to the dictionary.
|
| setbyindex |
|---|
| void | setbyindex | (int idx, boolean value) |
Changes the value of a dictionary element with the specified index to the specified value. If an element with the specified index does not exist in the dictionary, throws exception cipXInvalidDictIndex.
|
| remove |
|---|
| void | remove | (String key) |
Removes an element with the specified key from a dictionary.
|
| removebyindex |
|---|
| void | removebyindex | (int idx) |
Removes an element with the specified index from a dictionary. If an element with this index does not exist in the dictionary, throws exception cipXInvalidDictIndex.
|
| getbyindex |
|---|
| boolean | getbyindex | (int idx) |
Gets the value of an element with the specified index from a dictionary. If an element is found, returns yxtrue and sets the value pointer to point to the found value, otherwise returns xfalse. If the value pointer is 0, this method only verifies if an element with the specified index exists in the dictionary without returning its value. Use this method together with methods getmapsize and getkeybyindex to iterate through the dictionary.
|
| getkeybyindex |
|---|
| String | getkeybyindex | (int idx) |
Gets the key of an element with the specified index from a dictionary. If an element is found, returns xtrue and sets the key pointer to point to the found string value, otherwise returns xfalse. If the key pointer is 0, this method only verifies if an element with the specified index exists in the dictionary without returning its key. Use this method together with methods getmapsize and getbyindex to iterate through the dictionary.
|
| create |
|---|
| static booleandict | create | () |
Creates a new empty dictionary.
|