Trace:
Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
jvx:common:util:classes [2020/06/29 13:55] cduncan [XML Editing] |
jvx:common:util:classes [2020/06/29 13:58] cduncan [Hashtable With Automatic List Management] |
||
---|---|---|---|
Line 26: | Line 26: | ||
==== Working With Arrays ==== | ==== Working With Arrays ==== | ||
- | Array operations are always tedious coding work, and every developer could easily do without it. Removing a single element from an array is not rocket science, but there is no standard function available for this task. And who would not like to search an array for an element without coding a loop? | + | Array operations are always tedious coding work, and every developer could easily do without. Removing a single element from an array is not rocket science, but there is no standard function available for this task. And who would not like to search an array for an element without coding a loop? |
With ArrayUtil significant array operations were implemented, which also fully include the list interface. We gain performance compared to standard lists as an added benefit. | With ArrayUtil significant array operations were implemented, which also fully include the list interface. We gain performance compared to standard lists as an added benefit. | ||
Line 36: | Line 36: | ||
This is what the ObjectCache is for, which handles objects statically, for certain time periods or permanently, within a VM. | This is what the ObjectCache is for, which handles objects statically, for certain time periods or permanently, within a VM. | ||
- | This can be compared to a static hash table, complement by a timeout. | + | This can be compared to a static hash table complemented by a timeout. |
==== Ordered Hashtable ==== | ==== Ordered Hashtable ==== | ||
Line 46: | Line 46: | ||
==== Hashtable With Automatic List Management ==== | ==== Hashtable With Automatic List Management ==== | ||
- | The standard hashtable manages exactly one value per key. However, often more than one value per key has to be stored. In this case, a list has to be used as a value, in which a number of individual values are saved. This is not particularly difficult but a tedious and boring task. | + | The standard hashtable manages exactly one value per key. However, often more than one value per key has to be stored. In this case, a list has to be used as a value, in which a number of individual values are saved. This is not particularly difficult but a tedious and boring task nonetheless. |
The KeyValueList handles the administration of lists and leaves the developer time for more important tasks. | The KeyValueList handles the administration of lists and leaves the developer time for more important tasks. |