IdentitySet.st
author Claus Gittinger <cg@exept.de>
Thu, 07 Jun 2018 20:29:37 +0200
changeset 23058 b532f52a61a6
parent 22498 f5e8366a9fe5
child 23695 59ae587a1107
permissions -rw-r--r--
#REFACTORING by cg class: Collection class moved: #mutableClass
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
22498
f5e8366a9fe5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 20234
diff changeset
     1
"{ Encoding: utf8 }"
f5e8366a9fe5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 20234
diff changeset
     2
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
     3
"
a27a279701f8 Initial revision
claus
parents:
diff changeset
     4
 COPYRIGHT (c) 1993 by Claus Gittinger
250
a5deb61ffdac *** empty log message ***
claus
parents: 92
diff changeset
     5
	      All Rights Reserved
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
     6
a27a279701f8 Initial revision
claus
parents:
diff changeset
     7
 This software is furnished under a license and may be used
a27a279701f8 Initial revision
claus
parents:
diff changeset
     8
 only in accordance with the terms of that license and with the
a27a279701f8 Initial revision
claus
parents:
diff changeset
     9
 inclusion of the above copyright notice.   This software may not
a27a279701f8 Initial revision
claus
parents:
diff changeset
    10
 be provided or otherwise made available to, or used by, any
a27a279701f8 Initial revision
claus
parents:
diff changeset
    11
 other person.  No title to or ownership of the software is
a27a279701f8 Initial revision
claus
parents:
diff changeset
    12
 hereby transferred.
a27a279701f8 Initial revision
claus
parents:
diff changeset
    13
"
5559
426dee57de44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4625
diff changeset
    14
"{ Package: 'stx:libbasic' }"
426dee57de44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4625
diff changeset
    15
19546
48d60cfe82b9 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 16240
diff changeset
    16
"{ NameSpace: Smalltalk }"
48d60cfe82b9 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 16240
diff changeset
    17
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    18
Set subclass:#IdentitySet
1290
15ba3221b89b documentation
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
    19
	instanceVariableNames:''
15ba3221b89b documentation
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
    20
	classVariableNames:''
15ba3221b89b documentation
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
    21
	poolDictionaries:''
15ba3221b89b documentation
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
    22
	category:'Collections-Unordered'
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    23
!
a27a279701f8 Initial revision
claus
parents:
diff changeset
    24
88
81dacba7a63a *** empty log message ***
claus
parents: 85
diff changeset
    25
!IdentitySet class methodsFor:'documentation'!
81dacba7a63a *** empty log message ***
claus
parents: 85
diff changeset
    26
81dacba7a63a *** empty log message ***
claus
parents: 85
diff changeset
    27
copyright
81dacba7a63a *** empty log message ***
claus
parents: 85
diff changeset
    28
"
81dacba7a63a *** empty log message ***
claus
parents: 85
diff changeset
    29
 COPYRIGHT (c) 1993 by Claus Gittinger
250
a5deb61ffdac *** empty log message ***
claus
parents: 92
diff changeset
    30
	      All Rights Reserved
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    31
88
81dacba7a63a *** empty log message ***
claus
parents: 85
diff changeset
    32
 This software is furnished under a license and may be used
81dacba7a63a *** empty log message ***
claus
parents: 85
diff changeset
    33
 only in accordance with the terms of that license and with the
81dacba7a63a *** empty log message ***
claus
parents: 85
diff changeset
    34
 inclusion of the above copyright notice.   This software may not
81dacba7a63a *** empty log message ***
claus
parents: 85
diff changeset
    35
 be provided or otherwise made available to, or used by, any
81dacba7a63a *** empty log message ***
claus
parents: 85
diff changeset
    36
 other person.  No title to or ownership of the software is
81dacba7a63a *** empty log message ***
claus
parents: 85
diff changeset
    37
 hereby transferred.
81dacba7a63a *** empty log message ***
claus
parents: 85
diff changeset
    38
"
81dacba7a63a *** empty log message ***
claus
parents: 85
diff changeset
    39
!
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    40
88
81dacba7a63a *** empty log message ***
claus
parents: 85
diff changeset
    41
documentation
81dacba7a63a *** empty log message ***
claus
parents: 85
diff changeset
    42
"
81dacba7a63a *** empty log message ***
claus
parents: 85
diff changeset
    43
    same as a Set but compares elements using == 
81dacba7a63a *** empty log message ***
claus
parents: 85
diff changeset
    44
    (i.e. they must be identical - not just equal in structure).
81dacba7a63a *** empty log message ***
claus
parents: 85
diff changeset
    45
    Since compare is on identity (using ==), hashing is also done via
81dacba7a63a *** empty log message ***
claus
parents: 85
diff changeset
    46
    #identityHash instead of #hash.
1290
15ba3221b89b documentation
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
    47
15ba3221b89b documentation
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
    48
    [author:]
15ba3221b89b documentation
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
    49
        Claus Gittinger
88
81dacba7a63a *** empty log message ***
claus
parents: 85
diff changeset
    50
"
81dacba7a63a *** empty log message ***
claus
parents: 85
diff changeset
    51
! !
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    52
7310
8865e8d343cd +copyWithout/copyWithoutAll:
Claus Gittinger <cg@exept.de>
parents: 6953
diff changeset
    53
!IdentitySet methodsFor:'Compatibility-Squeak'!
8865e8d343cd +copyWithout/copyWithoutAll:
Claus Gittinger <cg@exept.de>
parents: 6953
diff changeset
    54
8865e8d343cd +copyWithout/copyWithoutAll:
Claus Gittinger <cg@exept.de>
parents: 6953
diff changeset
    55
copyWithout:anElement
11051
029e6b331d96 comment
Claus Gittinger <cg@exept.de>
parents: 10091
diff changeset
    56
    "return a new collection consisting of a copy of the receiver, with
029e6b331d96 comment
Claus Gittinger <cg@exept.de>
parents: 10091
diff changeset
    57
     ALL elements equal to elementToSkip are left out.
029e6b331d96 comment
Claus Gittinger <cg@exept.de>
parents: 10091
diff changeset
    58
     No error is reported, if elementToSkip is not in the collection."
029e6b331d96 comment
Claus Gittinger <cg@exept.de>
parents: 10091
diff changeset
    59
7310
8865e8d343cd +copyWithout/copyWithoutAll:
Claus Gittinger <cg@exept.de>
parents: 6953
diff changeset
    60
    ^ self select:[:each | each ~~ anElement]
8865e8d343cd +copyWithout/copyWithoutAll:
Claus Gittinger <cg@exept.de>
parents: 6953
diff changeset
    61
8865e8d343cd +copyWithout/copyWithoutAll:
Claus Gittinger <cg@exept.de>
parents: 6953
diff changeset
    62
    "
8865e8d343cd +copyWithout/copyWithoutAll:
Claus Gittinger <cg@exept.de>
parents: 6953
diff changeset
    63
     #(1 2 3 4 5 6 7) asSet copyWithout:5
8865e8d343cd +copyWithout/copyWithoutAll:
Claus Gittinger <cg@exept.de>
parents: 6953
diff changeset
    64
    "
8865e8d343cd +copyWithout/copyWithoutAll:
Claus Gittinger <cg@exept.de>
parents: 6953
diff changeset
    65
! !
8865e8d343cd +copyWithout/copyWithoutAll:
Claus Gittinger <cg@exept.de>
parents: 6953
diff changeset
    66
4625
1ebb8edfbd0d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3944
diff changeset
    67
!IdentitySet methodsFor:'adding & removing'!
1ebb8edfbd0d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3944
diff changeset
    68
15805
799bc1a4f3af class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 15037
diff changeset
    69
removeIdentical:oldObject ifAbsent:exceptionBlock
799bc1a4f3af class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 15037
diff changeset
    70
    "remove oldObject from the collection and return it.
799bc1a4f3af class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 15037
diff changeset
    71
     If it was not in the collection return the value of exceptionBlock.
799bc1a4f3af class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 15037
diff changeset
    72
     Uses identity compare (==) to search for an occurrence.
799bc1a4f3af class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 15037
diff changeset
    73
799bc1a4f3af class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 15037
diff changeset
    74
     WARNING: do not remove elements while iterating over the receiver."
799bc1a4f3af class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 15037
diff changeset
    75
799bc1a4f3af class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 15037
diff changeset
    76
    ^ self remove:oldObject ifAbsent:exceptionBlock
4625
1ebb8edfbd0d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3944
diff changeset
    77
! !
1ebb8edfbd0d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3944
diff changeset
    78
14998
6bea48d14676 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14655
diff changeset
    79
!IdentitySet methodsFor:'converting'!
6bea48d14676 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14655
diff changeset
    80
15037
893c7b5f5776 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14998
diff changeset
    81
asIdentitySet 
893c7b5f5776 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14998
diff changeset
    82
    "return the receiver as an IdentitySet"
893c7b5f5776 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14998
diff changeset
    83
893c7b5f5776 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14998
diff changeset
    84
    "could be an instance of a subclass..."
893c7b5f5776 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14998
diff changeset
    85
    self class == IdentitySet ifTrue:[
893c7b5f5776 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14998
diff changeset
    86
        ^ self
893c7b5f5776 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14998
diff changeset
    87
    ].
893c7b5f5776 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14998
diff changeset
    88
    ^ super asIdentitySet
893c7b5f5776 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14998
diff changeset
    89
!
893c7b5f5776 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14998
diff changeset
    90
14998
6bea48d14676 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14655
diff changeset
    91
asNewIdentitySet
15037
893c7b5f5776 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14998
diff changeset
    92
    "make sure to return myself as a unique new IdentitySet"
14998
6bea48d14676 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14655
diff changeset
    93
6bea48d14676 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14655
diff changeset
    94
    "could be an instance of a subclass..."
6bea48d14676 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14655
diff changeset
    95
    self class == IdentitySet ifTrue:[
6bea48d14676 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14655
diff changeset
    96
        ^ self copy
6bea48d14676 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14655
diff changeset
    97
    ].
6bea48d14676 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14655
diff changeset
    98
    ^ super asIdentitySet
6bea48d14676 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14655
diff changeset
    99
6bea48d14676 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14655
diff changeset
   100
    "
6bea48d14676 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14655
diff changeset
   101
        |s|
6bea48d14676 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14655
diff changeset
   102
        s := #(1 2 3 4) asIdentitySet.
6bea48d14676 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14655
diff changeset
   103
        self assert:(s ~~ s asNewIdentitySet).
6bea48d14676 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14655
diff changeset
   104
        self assert:(s = s asNewIdentitySet).
6bea48d14676 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14655
diff changeset
   105
    "
6bea48d14676 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14655
diff changeset
   106
! !
6bea48d14676 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14655
diff changeset
   107
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   108
!IdentitySet methodsFor:'private'!
a27a279701f8 Initial revision
claus
parents:
diff changeset
   109
14655
1d2b0650e086 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14018
diff changeset
   110
collisionsFor:key
1d2b0650e086 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14018
diff changeset
   111
    "Return the number of searches - 1 required for key"
1d2b0650e086 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14018
diff changeset
   112
1d2b0650e086 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14018
diff changeset
   113
    |index  "{ Class:SmallInteger }"
1d2b0650e086 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14018
diff changeset
   114
     length "{ Class:SmallInteger }" startIndex probe count|
1d2b0650e086 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14018
diff changeset
   115
1d2b0650e086 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14018
diff changeset
   116
    length := keyArray basicSize.
1d2b0650e086 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14018
diff changeset
   117
    startIndex := index := self initialIndexForKey:key.
1d2b0650e086 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14018
diff changeset
   118
1d2b0650e086 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14018
diff changeset
   119
    count := 0.
16240
aa502d6cbe9e [true] whileTrue: -> #loop
Stefan Vogel <sv@exept.de>
parents: 15805
diff changeset
   120
    [
14655
1d2b0650e086 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14018
diff changeset
   121
        probe := keyArray basicAt:index.
19546
48d60cfe82b9 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 16240
diff changeset
   122
        probe isNil ifTrue:[self error:'non existing key'].
48d60cfe82b9 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 16240
diff changeset
   123
        key == probe ifTrue:[^ count].
14655
1d2b0650e086 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14018
diff changeset
   124
1d2b0650e086 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14018
diff changeset
   125
        index == length ifTrue:[
1d2b0650e086 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14018
diff changeset
   126
            index := 1.
1d2b0650e086 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14018
diff changeset
   127
        ] ifFalse:[
1d2b0650e086 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14018
diff changeset
   128
            index := index + 1.
1d2b0650e086 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14018
diff changeset
   129
        ].
1d2b0650e086 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14018
diff changeset
   130
        count := count + 1.
1d2b0650e086 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14018
diff changeset
   131
        index == startIndex ifTrue:[self error:'non existing key'].
16240
aa502d6cbe9e [true] whileTrue: -> #loop
Stefan Vogel <sv@exept.de>
parents: 15805
diff changeset
   132
    ] loop.
14655
1d2b0650e086 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14018
diff changeset
   133
!
1d2b0650e086 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14018
diff changeset
   134
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   135
find:key ifAbsent:aBlock
a27a279701f8 Initial revision
claus
parents:
diff changeset
   136
    "Look for the key in the receiver.  If it is found, return
a27a279701f8 Initial revision
claus
parents:
diff changeset
   137
     the index of the slot containing the key, otherwise
a27a279701f8 Initial revision
claus
parents:
diff changeset
   138
     return the value of evaluating aBlock.
a27a279701f8 Initial revision
claus
parents:
diff changeset
   139
     Redefined to compare for identity instead of equality"
a27a279701f8 Initial revision
claus
parents:
diff changeset
   140
6233
0a79cbd07543 *** empty log message ***
martin
parents: 5559
diff changeset
   141
    |index  "{ Class:SmallInteger }"
0a79cbd07543 *** empty log message ***
martin
parents: 5559
diff changeset
   142
     length "{ Class:SmallInteger }"
0a79cbd07543 *** empty log message ***
martin
parents: 5559
diff changeset
   143
     startIndex probe |
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   144
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
   145
    length := keyArray basicSize.
1126
497de696dff0 OOPS - could add elements twice after a remove (shame on me: how could that go unnoticed for so long ...)
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
   146
497de696dff0 OOPS - could add elements twice after a remove (shame on me: how could that go unnoticed for so long ...)
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
   147
"/
497de696dff0 OOPS - could add elements twice after a remove (shame on me: how could that go unnoticed for so long ...)
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
   148
"/  length < 10 ifTrue:[
6233
0a79cbd07543 *** empty log message ***
martin
parents: 5559
diff changeset
   149
"/      "assuming, that for small sets the overhead of hashing
0a79cbd07543 *** empty log message ***
martin
parents: 5559
diff changeset
   150
"/       is large ..."
0a79cbd07543 *** empty log message ***
martin
parents: 5559
diff changeset
   151
"/      ^ keyArray identityIndexOf:key ifAbsent:aBlock.
1126
497de696dff0 OOPS - could add elements twice after a remove (shame on me: how could that go unnoticed for so long ...)
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
   152
"/  ].
497de696dff0 OOPS - could add elements twice after a remove (shame on me: how could that go unnoticed for so long ...)
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
   153
"/
10
claus
parents: 3
diff changeset
   154
6953
6b3a197638f0 invoke hash/idHash only in one place (initialIndexFor..)
Claus Gittinger <cg@exept.de>
parents: 6346
diff changeset
   155
    startIndex := index := self initialIndexForKey:key.
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   156
16240
aa502d6cbe9e [true] whileTrue: -> #loop
Stefan Vogel <sv@exept.de>
parents: 15805
diff changeset
   157
    [
6233
0a79cbd07543 *** empty log message ***
martin
parents: 5559
diff changeset
   158
        probe := keyArray basicAt:index.
22498
f5e8366a9fe5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 20234
diff changeset
   159
        probe == key ifTrue:[^ index].        "<-- is different from inherited"
19546
48d60cfe82b9 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 16240
diff changeset
   160
        probe isNil ifTrue:[^ aBlock value].
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   161
6233
0a79cbd07543 *** empty log message ***
martin
parents: 5559
diff changeset
   162
        index == length ifTrue:[
0a79cbd07543 *** empty log message ***
martin
parents: 5559
diff changeset
   163
            index := 1
0a79cbd07543 *** empty log message ***
martin
parents: 5559
diff changeset
   164
        ] ifFalse:[
0a79cbd07543 *** empty log message ***
martin
parents: 5559
diff changeset
   165
            index := index + 1
0a79cbd07543 *** empty log message ***
martin
parents: 5559
diff changeset
   166
        ].
0a79cbd07543 *** empty log message ***
martin
parents: 5559
diff changeset
   167
        index == startIndex ifTrue:[
0a79cbd07543 *** empty log message ***
martin
parents: 5559
diff changeset
   168
            ^ aBlock value
0a79cbd07543 *** empty log message ***
martin
parents: 5559
diff changeset
   169
        ]
16240
aa502d6cbe9e [true] whileTrue: -> #loop
Stefan Vogel <sv@exept.de>
parents: 15805
diff changeset
   170
    ] loop.
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   171
!
a27a279701f8 Initial revision
claus
parents:
diff changeset
   172
15805
799bc1a4f3af class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 15037
diff changeset
   173
findIdentical:key ifAbsent:aBlock
799bc1a4f3af class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 15037
diff changeset
   174
    "IdentitySet does identity compare anyway..."
799bc1a4f3af class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 15037
diff changeset
   175
799bc1a4f3af class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 15037
diff changeset
   176
    ^ self find:key ifAbsent:aBlock
799bc1a4f3af class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 15037
diff changeset
   177
!
799bc1a4f3af class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 15037
diff changeset
   178
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
   179
findKeyOrNil:key
1126
497de696dff0 OOPS - could add elements twice after a remove (shame on me: how could that go unnoticed for so long ...)
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
   180
    "Look for the key in the receiver.  
497de696dff0 OOPS - could add elements twice after a remove (shame on me: how could that go unnoticed for so long ...)
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
   181
     If it is found, return return the index of the first unused slot. 
19546
48d60cfe82b9 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 16240
diff changeset
   182
     Grow the receiver, if key was not found, and no unused slots were present
48d60cfe82b9 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 16240
diff changeset
   183
48d60cfe82b9 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 16240
diff changeset
   184
     Warning: an empty slot MUST be filled by the sender - it is only to be sent
48d60cfe82b9 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 16240
diff changeset
   185
              by at:put: / add: - like methods."
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   186
1126
497de696dff0 OOPS - could add elements twice after a remove (shame on me: how could that go unnoticed for so long ...)
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
   187
    |index  "{ Class:SmallInteger }"
497de696dff0 OOPS - could add elements twice after a remove (shame on me: how could that go unnoticed for so long ...)
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
   188
     length "{ Class:SmallInteger }"
497de696dff0 OOPS - could add elements twice after a remove (shame on me: how could that go unnoticed for so long ...)
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
   189
     startIndex probe 
19546
48d60cfe82b9 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 16240
diff changeset
   190
     delIndex "{ Class:SmallInteger }"|
1126
497de696dff0 OOPS - could add elements twice after a remove (shame on me: how could that go unnoticed for so long ...)
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
   191
497de696dff0 OOPS - could add elements twice after a remove (shame on me: how could that go unnoticed for so long ...)
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
   192
    delIndex := 0.
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   193
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
   194
    length := keyArray basicSize.
6953
6b3a197638f0 invoke hash/idHash only in one place (initialIndexFor..)
Claus Gittinger <cg@exept.de>
parents: 6346
diff changeset
   195
    startIndex := index := self initialIndexForKey:key.
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   196
16240
aa502d6cbe9e [true] whileTrue: -> #loop
Stefan Vogel <sv@exept.de>
parents: 15805
diff changeset
   197
    [
6346
a69610ec89a0 slotIsEmpty
Claus Gittinger <cg@exept.de>
parents: 6233
diff changeset
   198
        probe := keyArray basicAt:index.
a69610ec89a0 slotIsEmpty
Claus Gittinger <cg@exept.de>
parents: 6233
diff changeset
   199
        key == probe ifTrue:[^ index].
19546
48d60cfe82b9 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 16240
diff changeset
   200
        probe isNil ifTrue:[
6346
a69610ec89a0 slotIsEmpty
Claus Gittinger <cg@exept.de>
parents: 6233
diff changeset
   201
            delIndex == 0 ifTrue:[^ index].
a69610ec89a0 slotIsEmpty
Claus Gittinger <cg@exept.de>
parents: 6233
diff changeset
   202
            keyArray basicAt:delIndex put:nil.
a69610ec89a0 slotIsEmpty
Claus Gittinger <cg@exept.de>
parents: 6233
diff changeset
   203
            ^ delIndex
a69610ec89a0 slotIsEmpty
Claus Gittinger <cg@exept.de>
parents: 6233
diff changeset
   204
        ].
1126
497de696dff0 OOPS - could add elements twice after a remove (shame on me: how could that go unnoticed for so long ...)
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
   205
6346
a69610ec89a0 slotIsEmpty
Claus Gittinger <cg@exept.de>
parents: 6233
diff changeset
   206
        probe == DeletedEntry ifTrue:[
a69610ec89a0 slotIsEmpty
Claus Gittinger <cg@exept.de>
parents: 6233
diff changeset
   207
            delIndex == 0 ifTrue:[
a69610ec89a0 slotIsEmpty
Claus Gittinger <cg@exept.de>
parents: 6233
diff changeset
   208
                delIndex := index
a69610ec89a0 slotIsEmpty
Claus Gittinger <cg@exept.de>
parents: 6233
diff changeset
   209
            ]
a69610ec89a0 slotIsEmpty
Claus Gittinger <cg@exept.de>
parents: 6233
diff changeset
   210
        ].
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   211
6346
a69610ec89a0 slotIsEmpty
Claus Gittinger <cg@exept.de>
parents: 6233
diff changeset
   212
        index == length ifTrue:[
a69610ec89a0 slotIsEmpty
Claus Gittinger <cg@exept.de>
parents: 6233
diff changeset
   213
            index := 1
a69610ec89a0 slotIsEmpty
Claus Gittinger <cg@exept.de>
parents: 6233
diff changeset
   214
        ] ifFalse:[
a69610ec89a0 slotIsEmpty
Claus Gittinger <cg@exept.de>
parents: 6233
diff changeset
   215
            index := index + 1
a69610ec89a0 slotIsEmpty
Claus Gittinger <cg@exept.de>
parents: 6233
diff changeset
   216
        ].
a69610ec89a0 slotIsEmpty
Claus Gittinger <cg@exept.de>
parents: 6233
diff changeset
   217
        index == startIndex ifTrue:[
a69610ec89a0 slotIsEmpty
Claus Gittinger <cg@exept.de>
parents: 6233
diff changeset
   218
            delIndex ~~ 0 ifTrue:[
a69610ec89a0 slotIsEmpty
Claus Gittinger <cg@exept.de>
parents: 6233
diff changeset
   219
                keyArray basicAt:delIndex put:nil.
a69610ec89a0 slotIsEmpty
Claus Gittinger <cg@exept.de>
parents: 6233
diff changeset
   220
                ^ delIndex
a69610ec89a0 slotIsEmpty
Claus Gittinger <cg@exept.de>
parents: 6233
diff changeset
   221
            ].
20234
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   222
            self grow.
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   223
            length := keyArray basicSize.
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   224
            startIndex := index := self initialIndexForKey:key.
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   225
        ].
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   226
    ] loop.
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   227
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   228
    "Modified: 26.3.1996 / 20:00:42 / cg"
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   229
!
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   230
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   231
findKeyOrNilOrDeletedEntry:key
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   232
    "Look for the key in the receiver.  
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   233
     If it is found, return return the index of the first unused slot. 
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   234
     Grow the receiver, if key was not found, and no unused slots were present"
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   235
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   236
    |index  "{ Class:SmallInteger }"
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   237
     length "{ Class:SmallInteger }"
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   238
     startIndex probe 
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   239
     delIndex "{ Class:SmallInteger }"|
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   240
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   241
    delIndex := 0.
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   242
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   243
    length := keyArray basicSize.
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   244
    startIndex := index := self initialIndexForKey:key.
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   245
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   246
    [
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   247
        probe := keyArray basicAt:index.
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   248
        key == probe ifTrue:[^ index].
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   249
        probe isNil ifTrue:[
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   250
            delIndex == 0 ifTrue:[^ index].
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   251
            ^ delIndex
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   252
        ].
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   253
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   254
        probe == DeletedEntry ifTrue:[
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   255
            delIndex == 0 ifTrue:[
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   256
                delIndex := index
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   257
            ]
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   258
        ].
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   259
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   260
        index == length ifTrue:[
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   261
            index := 1
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   262
        ] ifFalse:[
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   263
            index := index + 1
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   264
        ].
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   265
        index == startIndex ifTrue:[
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   266
            delIndex ~~ 0 ifTrue:[
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   267
                ^ delIndex
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   268
            ].
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   269
            self grow.
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   270
            length := keyArray basicSize.
1b1281334a9a #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 19546
diff changeset
   271
            startIndex := index := self initialIndexForKey:key.
6346
a69610ec89a0 slotIsEmpty
Claus Gittinger <cg@exept.de>
parents: 6233
diff changeset
   272
        ].
16240
aa502d6cbe9e [true] whileTrue: -> #loop
Stefan Vogel <sv@exept.de>
parents: 15805
diff changeset
   273
    ] loop.
1126
497de696dff0 OOPS - could add elements twice after a remove (shame on me: how could that go unnoticed for so long ...)
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
   274
497de696dff0 OOPS - could add elements twice after a remove (shame on me: how could that go unnoticed for so long ...)
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
   275
    "Modified: 26.3.1996 / 20:00:42 / cg"
10
claus
parents: 3
diff changeset
   276
!
claus
parents: 3
diff changeset
   277
2460
1d7caef5f5ed added #hashFor:
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
   278
hashFor:aKey
1d7caef5f5ed added #hashFor:
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
   279
    "return an initial index given a key."
1d7caef5f5ed added #hashFor:
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
   280
1d7caef5f5ed added #hashFor:
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
   281
    ^ aKey identityHash
1d7caef5f5ed added #hashFor:
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
   282
1d7caef5f5ed added #hashFor:
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
   283
    "Created: 19.3.1997 / 15:18:59 / cg"
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   284
! !
609
12be97f6d5a7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   285
14018
351ab0fb005d added: #
Stefan Vogel <sv@exept.de>
parents: 14016
diff changeset
   286
!IdentitySet methodsFor:'set operations'!
351ab0fb005d added: #
Stefan Vogel <sv@exept.de>
parents: 14016
diff changeset
   287
351ab0fb005d added: #
Stefan Vogel <sv@exept.de>
parents: 14016
diff changeset
   288
\ aCollection
351ab0fb005d added: #
Stefan Vogel <sv@exept.de>
parents: 14016
diff changeset
   289
    "return a new set containing all elements of the receiver, 
351ab0fb005d added: #
Stefan Vogel <sv@exept.de>
parents: 14016
diff changeset
   290
     which are NOT also contained in the aCollection
351ab0fb005d added: #
Stefan Vogel <sv@exept.de>
parents: 14016
diff changeset
   291
     For large collections you better use a Set for aCollection.
351ab0fb005d added: #
Stefan Vogel <sv@exept.de>
parents: 14016
diff changeset
   292
     Redefined here to do identity comparison."
351ab0fb005d added: #
Stefan Vogel <sv@exept.de>
parents: 14016
diff changeset
   293
351ab0fb005d added: #
Stefan Vogel <sv@exept.de>
parents: 14016
diff changeset
   294
    |newCollection|
351ab0fb005d added: #
Stefan Vogel <sv@exept.de>
parents: 14016
diff changeset
   295
351ab0fb005d added: #
Stefan Vogel <sv@exept.de>
parents: 14016
diff changeset
   296
    newCollection := self speciesForAdding new.
351ab0fb005d added: #
Stefan Vogel <sv@exept.de>
parents: 14016
diff changeset
   297
    self do:[:element |
351ab0fb005d added: #
Stefan Vogel <sv@exept.de>
parents: 14016
diff changeset
   298
        (aCollection includesIdentical:element) ifFalse:[
351ab0fb005d added: #
Stefan Vogel <sv@exept.de>
parents: 14016
diff changeset
   299
            newCollection add:element
351ab0fb005d added: #
Stefan Vogel <sv@exept.de>
parents: 14016
diff changeset
   300
        ]
351ab0fb005d added: #
Stefan Vogel <sv@exept.de>
parents: 14016
diff changeset
   301
    ].
351ab0fb005d added: #
Stefan Vogel <sv@exept.de>
parents: 14016
diff changeset
   302
    ^ newCollection
351ab0fb005d added: #
Stefan Vogel <sv@exept.de>
parents: 14016
diff changeset
   303
351ab0fb005d added: #
Stefan Vogel <sv@exept.de>
parents: 14016
diff changeset
   304
    "
351ab0fb005d added: #
Stefan Vogel <sv@exept.de>
parents: 14016
diff changeset
   305
     #(0 1 2 3 4 5 6 7 8 9) asIdentitySet \ #(1 2 3) asSet  
351ab0fb005d added: #
Stefan Vogel <sv@exept.de>
parents: 14016
diff changeset
   306
     #(0 1 2 3 4 5 6 7 8 9) asIdentitySet \ #(1 2 3)
351ab0fb005d added: #
Stefan Vogel <sv@exept.de>
parents: 14016
diff changeset
   307
    "
351ab0fb005d added: #
Stefan Vogel <sv@exept.de>
parents: 14016
diff changeset
   308
! !
351ab0fb005d added: #
Stefan Vogel <sv@exept.de>
parents: 14016
diff changeset
   309
3944
541580143566 #includesIdentical: is the same as #includes:
Claus Gittinger <cg@exept.de>
parents: 2474
diff changeset
   310
!IdentitySet methodsFor:'testing'!
541580143566 #includesIdentical: is the same as #includes:
Claus Gittinger <cg@exept.de>
parents: 2474
diff changeset
   311
5559
426dee57de44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4625
diff changeset
   312
identicalContentsAs:aCollection
426dee57de44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4625
diff changeset
   313
    "return true if the receiver and aCollection represent collections
426dee57de44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4625
diff changeset
   314
     with identical contents (but not caring for order)."
426dee57de44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4625
diff changeset
   315
426dee57de44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4625
diff changeset
   316
    aCollection size == self size ifFalse:[^ false].
10091
ad0bf1206ce0 code cleanup: use #contains/#conform instead of explicit loop
Claus Gittinger <cg@exept.de>
parents: 7310
diff changeset
   317
    ^ aCollection conform:[:eachElement | (self includesIdentical:eachElement)].
5559
426dee57de44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4625
diff changeset
   318
426dee57de44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4625
diff changeset
   319
    "
426dee57de44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4625
diff changeset
   320
     |col|
426dee57de44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4625
diff changeset
   321
426dee57de44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4625
diff changeset
   322
     col := #('aaa' 'bbb' 'ccc' 'ddd').
426dee57de44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4625
diff changeset
   323
     col identicalContentsAs:(col asIdentitySet).  
426dee57de44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4625
diff changeset
   324
     col identicalContentsAs:(col copy asIdentitySet).  
426dee57de44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4625
diff changeset
   325
     col identicalContentsAs:(col deepCopy asIdentitySet).  
426dee57de44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4625
diff changeset
   326
   "
10091
ad0bf1206ce0 code cleanup: use #contains/#conform instead of explicit loop
Claus Gittinger <cg@exept.de>
parents: 7310
diff changeset
   327
ad0bf1206ce0 code cleanup: use #contains/#conform instead of explicit loop
Claus Gittinger <cg@exept.de>
parents: 7310
diff changeset
   328
    "Modified: / 13-10-2006 / 12:55:43 / cg"
5559
426dee57de44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4625
diff changeset
   329
!
426dee57de44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4625
diff changeset
   330
3944
541580143566 #includesIdentical: is the same as #includes:
Claus Gittinger <cg@exept.de>
parents: 2474
diff changeset
   331
includesIdentical:anObject
541580143566 #includesIdentical: is the same as #includes:
Claus Gittinger <cg@exept.de>
parents: 2474
diff changeset
   332
    "for identitySet, the #includes: test already tests for identity"
541580143566 #includesIdentical: is the same as #includes:
Claus Gittinger <cg@exept.de>
parents: 2474
diff changeset
   333
541580143566 #includesIdentical: is the same as #includes:
Claus Gittinger <cg@exept.de>
parents: 2474
diff changeset
   334
    ^ self includes:anObject
541580143566 #includesIdentical: is the same as #includes:
Claus Gittinger <cg@exept.de>
parents: 2474
diff changeset
   335
541580143566 #includesIdentical: is the same as #includes:
Claus Gittinger <cg@exept.de>
parents: 2474
diff changeset
   336
    "Created: / 11.12.1998 / 20:01:12 / cg"
541580143566 #includesIdentical: is the same as #includes:
Claus Gittinger <cg@exept.de>
parents: 2474
diff changeset
   337
! !
541580143566 #includesIdentical: is the same as #includes:
Claus Gittinger <cg@exept.de>
parents: 2474
diff changeset
   338
634
e15218d09420 version at the end
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
   339
!IdentitySet class methodsFor:'documentation'!
e15218d09420 version at the end
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
   340
e15218d09420 version at the end
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
   341
version
19546
48d60cfe82b9 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 16240
diff changeset
   342
    ^ '$Header$'
634
e15218d09420 version at the end
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
   343
! !
14655
1d2b0650e086 class: IdentitySet
Stefan Vogel <sv@exept.de>
parents: 14018
diff changeset
   344