eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'IdentitySet':

Home

everywhere
www.exept.de
for:
[back]

Class: IdentitySet


Inheritance:

   Object
   |
   +--Collection
      |
      +--Set
         |
         +--IdentitySet
            |
            +--SemaphoreSet
            |
            +--SignalSet
            |
            +--WeakIdentitySet

Package:
stx:libbasic
Category:
Collections-Unordered
Version:
rev: 1.31 date: 2008/06/09 18:47:23
user: cg
file: IdentitySet.st directory: libbasic
module: stx stc-classLibrary: libbasic
Author:
Claus Gittinger

Description:


same as a Set but compares elements using == 
(i.e. they must be identical - not just equal in structure).
Since compare is on identity (using ==), hashing is also done via
#identityHash instead of #hash.


Instance protocol:

Compatibility-Squeak
o  copyWithout: anElement
return a new collection consisting of a copy of the receiver, with
ALL elements equal to elementToSkip are left out.
No error is reported, if elementToSkip is not in the collection.

o  copyWithoutAll: aCollection

adding & removing
o  removeIdentical: anObject ifAbsent: exceptionBlock

private
o  find: key ifAbsent: aBlock
Look for the key in the receiver. If it is found, return
the index of the slot containing the key, otherwise
return the value of evaluating aBlock.
Redefined to compare for identity instead of equality

o  findKeyOrNil: key
Look for the key in the receiver.
If it is found, return return the index of the first unused slot.
Grow the receiver, if key was not found, and no unused slots were present

o  hashFor: aKey
return an initial index given a key.

testing
o  identicalContentsAs: aCollection
return true if the receiver and aCollection represent collections
with identical contents (but not caring for order).

o  includesIdentical: anObject
for identitySet, the #includes: test already tests for identity



ST/X 6.1.1; WebServer 1.620 at exept:8081; Wed, 23 May 2012 19:33:27 GMT