eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'CharacterDictionary':

Home

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

Class: CharacterDictionary


Inheritance:

   Object
   |
   +--Collection
      |
      +--CharacterDictionary

Package:
stx:libbasic2
Category:
Collections-Ordered
Version:
rev: 1.4 date: 2021/11/25 17:41:19
user: cg
file: CharacterDictionary.st directory: libbasic2
module: stx stc-classLibrary: libbasic2
Author:
cg

Description:


a very special dictionary-like collection,
which effectively maps characters to values.
API:
    the API is similar to a dictionary, but only characters
    are allowed as keys.

implementation:
    uses fast direct indexed access instead of hashing


[instance variables:]
    {InstanceVariable: pages Class: Array}


Related information:

    Dictionary
    CharacterSet

Class protocol:

instance creation
o  new
return an initialized instance


Instance protocol:

accessing
o  at: aCharacter
(comment from inherited method)
return the indexed instance variable with index, anInteger;
this method can be redefined in subclasses.

o  at: aCharacter ifAbsent: exceptionValue
}

o  at: aCharacter put: something
}

o  growPagesTo: pageIndex

enumerating
o  do: aBlock
(comment from inherited method)
evaluate the argument, aBlock for each element.
Return the receiver
(subclasses should care to also return the receiver,
in case do: is used in a chain of messages.)

o  keysAndValuesDo: aTwoArgBlock
(comment from inherited method)
evaluate the argument, aBlock for every element in the collection,
passing both index and element as arguments.
Blocked here - must be redefined in subclasses which have keyed elements

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

queries
o  size



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sat, 21 Dec 2024 17:08:53 GMT