Next: , Previous: Namespace-namespace hierarchy, Up: Namespace


1.113.6 Namespace: overrides for superspaces

associationAt: key ifAbsent: aBlock
Return the key/value pair associated to the variable named as specified by `key'. If the key is not found search will be brought on in superspaces, finally evaluating aBlock if the variable cannot be found in any of the superspaces.


associationsDo: aBlock
Pass each association in the namespace to aBlock


at: key ifAbsent: aBlock
Return the value associated to the variable named as specified by `key'. If the key is not found search will be brought on in superspaces, finally evaluating aBlock if the variable cannot be found in any of the superspaces.


at: key ifPresent: aBlock
If aKey is absent from the receiver and all its superspaces, answer nil. Else, evaluate aBlock passing the associated value and answer the result of the invocation


do: aBlock
Pass each value in the namespace to aBlock


includesKey: key
Answer whether the receiver or any of its superspaces contain the given key


keysAndValuesDo: aBlock
Pass to aBlock each of the receiver's keys and values, in two separate parameters


keysDo: aBlock
Pass to aBlock each of the receiver's keys


set: key to: newValue ifAbsent: aBlock
Assign newValue to the variable named as specified by `key'. This method won't define a new variable; instead if the key is not found it will search in superspaces and evaluate aBlock if it is not found. Answer newValue.


size
Answer the number of keys in the receiver and each of its superspaces