MultiLevelIdentityDictionary:
Filter:
Classes | Collections > Unordered

MultiLevelIdentityDictionary : Collection : Object

tree of dictionaries
Source: Library.sc
Subclasses: LibraryBase

Description

A tree of IdentityDictionaries. Addresses within the tree are specified with a series of keys. Library is its most useful subclass.

Class Methods

Inherited class methods

Undocumented class methods

MultiLevelIdentityDictionary.new

Instance Methods

.at( ... path)

Retrieves a leaf node or nil if not found.

.put( ... path)

Puts the item as a leaf node, internally creating new branches as needed to accommodate the list of keys.

.choose( ... start)

Choose a branch at each level, descend the tree until a leaf is chosen. By using arguments key1, key2 ... keyN, one can start at an address within the tree, descend the tree until a leaf is chosen.

.putTree( ... items)

A way to insert objects into the tree with a syntax similar to the organization of the tree itself.

.removeAt( ... path)

Remove only the item located by the path.

.removeEmptyAt( ... path)

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.

Inherited instance methods

Undocumented instance methods

.atPath(path)

.atPathFail(path, function)

.create( ... args)

.dictionary

.dictionary = value

.do(function)

.doLeafDo(path, object, func)

.doSortedTreeDo(path, object, branchFunc, leafFunc, argument, postBranchFunc, sortFunc)

.doTreeCollect(path, object, branchFunc, leafFunc, postBranchFunc)

.doTreeDo(path, object, branchFunc, leafFunc, argument, postBranchFunc)

.leafDo(func)

.leafDoFrom(folderpath, func)

.leafDoInBranch(folderpath, function)

.newInternalNode

.nodeType

.postTree(obj, tabs: 0)

.putAtPath(path, val)

.removeAtPath(path)

.removeEmptyAtPath(path)

.sortedTreeDo(branchFunc, leafFunc, argument0, postBranchFunc, sortFunc)

.treeCollect(branchFunc, leafFunc, postBranchFunc)

.treeDo(branchFunc, leafFunc, argument0, postBranchFunc)

.treeDoFrom(folderpath, branchFunc, leafFunc, argument0, postBranchFunc)

Examples