|
Class: RBSmallDictionary
Object
|
+--Collection
|
+--KeyedCollection
|
+--RBSmallDictionary
- Package:
- stx:goodies/refactoryBrowser/parser
- Category:
- Refactory-ParseTree Matching
- Version:
- rev:
1.12
date: 2023/02/02 09:01:48
- user: stefan
- file: RBSmallDictionary.st directory: goodies/refactoryBrowser/parser
- module: stx stc-classLibrary: parser
instance creation
-
new
-
(comment from inherited method)
return an instance of myself without indexed variables
-
new: aSize
-
Ignore the size
accessing
-
at: key ifAbsent: aBlock
-
(comment from inherited method)
return the value stored under akey.
Return the value from evaluating exceptionBlock if not found
-
at: key ifAbsentPut: aBlock
-
(comment from inherited method)
return the element indexed by aKey if present,
if not present, store the result of evaluating valueBlock
under aKey and return it.
WARNING: do not add elements while iterating over the receiver.
Iterate over a copy to do this.
-
empty
-
-
size
-
adding
-
add: anAssociation
-
(comment from inherited method)
add the argument, anObject to the receiver.
If the receiver is ordered, the position of the new element is undefined
(i.e. don't depend on where it will be put).
An error is raised here - it is to be implemented by a concrete subclass.
-
at: key put: value
-
(comment from inherited method)
add the argument anObject under key, aKey to the receiver.
Return anObject (sigh).
WARNING: do not add elements while iterating over the receiver.
Iterate over a copy to do this.
copying-private
-
postCopy
-
(comment from inherited method)
this is for compatibility with ST-80 code, which uses postCopy for
cleanup after copying, while ST/X passes the original in postCopyFrom:
(see there)
enumerating
-
do: aBlock
-
(comment from inherited method)
evaluate aBlock for each value
-
keysAndValuesDo: aBlock
-
(comment from inherited method)
evaluate aBlock for each key and value
-
keysDo: aBlock
-
(comment from inherited method)
evaluate the argument, aBlock for every key in the collection.
initialize-release
-
initialize
-
(comment from inherited method)
just to ignore initialize to objects which do not need it
private
-
fastSizeOr0
-
optimization for subclasses that can provide the collection's size in a fast way
-
findIndexFor: aKey
-
-
growKeysAndValues
-
-
growTo: aSize
-
-
privateAt: key put: value
-
removing
-
remove: oldObject ifAbsent: anExceptionBlock
-
(comment from inherited method)
search for the first element, which is equal to anObject;
if found, remove and return it.
If not found, return the value of the exceptionBlock.
Uses equality compare (=) to search for the occurrence.
An error is raised here - it is to be implemented by a concrete subclass.
-
removeAll
-
-
removeKey: key ifAbsent: aBlock
-
(comment from inherited method)
remove key (and the value stored under that key) from the
receiver; return the value which was stored previously there.
If no such element is contained, return the value
from evaluating exceptionBlock
testing
-
includesKey: aKey
-
(comment from inherited method)
return true, if the argument, aKey is a key in the receiver
|