eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'RBSmallDictionary':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: RBSmallDictionary


Inheritance:

   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

Class protocol:

instance creation
o  new
(comment from inherited method)
return an instance of myself without indexed variables

o  new: aSize
Ignore the size


Instance protocol:

accessing
o  at: key ifAbsent: aBlock
(comment from inherited method)
return the value stored under akey.
Return the value from evaluating exceptionBlock if not found

o  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.

o  empty

o  size

adding
o  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.

o  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
o  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
o  do: aBlock
(comment from inherited method)
evaluate aBlock for each value

o  keysAndValuesDo: aBlock
(comment from inherited method)
evaluate aBlock for each key and value

o  keysDo: aBlock
(comment from inherited method)
evaluate the argument, aBlock for every key in the collection.

initialize-release
o  initialize
(comment from inherited method)
just to ignore initialize to objects which do not need it

private
o  fastSizeOr0
optimization for subclasses that can provide the collection's size in a fast way

o  findIndexFor: aKey

o  growKeysAndValues

o  growTo: aSize

o  privateAt: key put: value

removing
o  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.

o  removeAll

o  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
o  includesKey: aKey
(comment from inherited method)
return true, if the argument, aKey is a key in the receiver



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Mon, 20 May 2024 01:49:51 GMT