1 CLASS::MultiLevelIdentityDictionary
2 summary::tree of dictionaries
3 related:: Classes/IdentityDictionary
4 categories:: Collections>Unordered
7 A tree of IdentityDictionaries. Addresses within the tree are specified with a series of keys. link::Classes/Library:: is its most useful subclass.
11 private::add, remove, removeFail, prChooseFrom, prPutTree, leaves, prNestedValuesFromDict, prRemoveAtPathRecursive, storeOn, printOn
14 Retrieves a leaf node or nil if not found.
17 Puts the item as a leaf node, internally creating new branches as needed to accommodate the list of keys.
20 Choose a branch at each level, descend the tree until a leaf is chosen.
21 By using arguments strong::key1, key2 ... keyN::, one can start at an address within the tree, descend the tree until a leaf is chosen.
24 A way to insert objects into the tree with a syntax similar to the organization of the tree itself.
37 Remove only the item located by the path.
40 Remove the item located by the path. This might make the item's parent dictionary empty. In that case, it will remove the parent and continue up the chain, removing empty dictionaries as it goes. This is slower but cleaner.
45 // Example of the difference between removeAt and removeEmptyAt
47 m = MultiLevelIdentityDictionary.new;
50 m.removeAt(\a, \b, \c);
51 m // note, \a and \b dictionaries remain
54 m.removeEmptyAt(\a, \b, \c);
55 m // now the entire MultiLevelIdentityDictionary is empty