IdentitySet.st
author Claus Gittinger <cg@exept.de>
Fri, 09 Nov 2001 16:18:46 +0100
changeset 6172 a3c88ea5efe9
parent 5559 426dee57de44
child 6233 0a79cbd07543
permissions -rw-r--r--
comment and iso8601 (time/date formats) fixes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
     1
"
a27a279701f8 Initial revision
claus
parents:
diff changeset
     2
 COPYRIGHT (c) 1993 by Claus Gittinger
250
a5deb61ffdac *** empty log message ***
claus
parents: 92
diff changeset
     3
	      All Rights Reserved
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
     4
a27a279701f8 Initial revision
claus
parents:
diff changeset
     5
 This software is furnished under a license and may be used
a27a279701f8 Initial revision
claus
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
a27a279701f8 Initial revision
claus
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
a27a279701f8 Initial revision
claus
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
a27a279701f8 Initial revision
claus
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
a27a279701f8 Initial revision
claus
parents:
diff changeset
    10
 hereby transferred.
a27a279701f8 Initial revision
claus
parents:
diff changeset
    11
"
a27a279701f8 Initial revision
claus
parents:
diff changeset
    12
5559
426dee57de44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4625
diff changeset
    13
"{ Package: 'stx:libbasic' }"
426dee57de44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4625
diff changeset
    14
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    15
Set subclass:#IdentitySet
1290
15ba3221b89b documentation
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
    16
	instanceVariableNames:''
15ba3221b89b documentation
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
    17
	classVariableNames:''
15ba3221b89b documentation
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
    18
	poolDictionaries:''
15ba3221b89b documentation
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
    19
	category:'Collections-Unordered'
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    20
!
a27a279701f8 Initial revision
claus
parents:
diff changeset
    21
88
81dacba7a63a *** empty log message ***
claus
parents: 85
diff changeset
    22
!IdentitySet class methodsFor:'documentation'!
81dacba7a63a *** empty log message ***
claus
parents: 85
diff changeset
    23
81dacba7a63a *** empty log message ***
claus
parents: 85
diff changeset
    24
copyright
81dacba7a63a *** empty log message ***
claus
parents: 85
diff changeset
    25
"
81dacba7a63a *** empty log message ***
claus
parents: 85
diff changeset
    26
 COPYRIGHT (c) 1993 by Claus Gittinger
250
a5deb61ffdac *** empty log message ***
claus
parents: 92
diff changeset
    27
	      All Rights Reserved
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    28
88
81dacba7a63a *** empty log message ***
claus
parents: 85
diff changeset
    29
 This software is furnished under a license and may be used
81dacba7a63a *** empty log message ***
claus
parents: 85
diff changeset
    30
 only in accordance with the terms of that license and with the
81dacba7a63a *** empty log message ***
claus
parents: 85
diff changeset
    31
 inclusion of the above copyright notice.   This software may not
81dacba7a63a *** empty log message ***
claus
parents: 85
diff changeset
    32
 be provided or otherwise made available to, or used by, any
81dacba7a63a *** empty log message ***
claus
parents: 85
diff changeset
    33
 other person.  No title to or ownership of the software is
81dacba7a63a *** empty log message ***
claus
parents: 85
diff changeset
    34
 hereby transferred.
81dacba7a63a *** empty log message ***
claus
parents: 85
diff changeset
    35
"
81dacba7a63a *** empty log message ***
claus
parents: 85
diff changeset
    36
!
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    37
88
81dacba7a63a *** empty log message ***
claus
parents: 85
diff changeset
    38
documentation
81dacba7a63a *** empty log message ***
claus
parents: 85
diff changeset
    39
"
81dacba7a63a *** empty log message ***
claus
parents: 85
diff changeset
    40
    same as a Set but compares elements using == 
81dacba7a63a *** empty log message ***
claus
parents: 85
diff changeset
    41
    (i.e. they must be identical - not just equal in structure).
81dacba7a63a *** empty log message ***
claus
parents: 85
diff changeset
    42
    Since compare is on identity (using ==), hashing is also done via
81dacba7a63a *** empty log message ***
claus
parents: 85
diff changeset
    43
    #identityHash instead of #hash.
1290
15ba3221b89b documentation
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
    44
15ba3221b89b documentation
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
    45
    [author:]
15ba3221b89b documentation
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
    46
        Claus Gittinger
88
81dacba7a63a *** empty log message ***
claus
parents: 85
diff changeset
    47
"
81dacba7a63a *** empty log message ***
claus
parents: 85
diff changeset
    48
! !
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    49
4625
1ebb8edfbd0d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3944
diff changeset
    50
!IdentitySet methodsFor:'adding & removing'!
1ebb8edfbd0d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3944
diff changeset
    51
1ebb8edfbd0d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3944
diff changeset
    52
removeIdentical:anObject ifAbsent:exceptionBlock
1ebb8edfbd0d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3944
diff changeset
    53
    ^ super remove:anObject ifAbsent:exceptionBlock
1ebb8edfbd0d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3944
diff changeset
    54
! !
1ebb8edfbd0d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3944
diff changeset
    55
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    56
!IdentitySet methodsFor:'private'!
a27a279701f8 Initial revision
claus
parents:
diff changeset
    57
a27a279701f8 Initial revision
claus
parents:
diff changeset
    58
find:key ifAbsent:aBlock
a27a279701f8 Initial revision
claus
parents:
diff changeset
    59
    "Look for the key in the receiver.  If it is found, return
a27a279701f8 Initial revision
claus
parents:
diff changeset
    60
     the index of the slot containing the key, otherwise
a27a279701f8 Initial revision
claus
parents:
diff changeset
    61
     return the value of evaluating aBlock.
a27a279701f8 Initial revision
claus
parents:
diff changeset
    62
     Redefined to compare for identity instead of equality"
a27a279701f8 Initial revision
claus
parents:
diff changeset
    63
a27a279701f8 Initial revision
claus
parents:
diff changeset
    64
    |index      "{ Class:SmallInteger }"
3
24d81bf47225 *** empty log message ***
claus
parents: 1
diff changeset
    65
     length startIndex probe |
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    66
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
    67
    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
    68
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
    69
"/
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
    70
"/  length < 10 ifTrue:[
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
    71
"/	"assuming, that for small sets the overhead of hashing
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
    72
"/	 is large ..."
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
    73
"/	^ keyArray identityIndexOf:key ifAbsent:aBlock.
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
    74
"/  ].
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
    75
"/
10
claus
parents: 3
diff changeset
    76
362
claus
parents: 250
diff changeset
    77
    index := key identityHash.
1975
c94a8e0b0251 avoid largeIntegers
Claus Gittinger <cg@exept.de>
parents: 1972
diff changeset
    78
    index < 16r1FFFFFFF ifTrue:[
c94a8e0b0251 avoid largeIntegers
Claus Gittinger <cg@exept.de>
parents: 1972
diff changeset
    79
        index := index * 2
c94a8e0b0251 avoid largeIntegers
Claus Gittinger <cg@exept.de>
parents: 1972
diff changeset
    80
    ].
c94a8e0b0251 avoid largeIntegers
Claus Gittinger <cg@exept.de>
parents: 1972
diff changeset
    81
    index := index \\ length + 1.
362
claus
parents: 250
diff changeset
    82
    startIndex := index.
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    83
a27a279701f8 Initial revision
claus
parents:
diff changeset
    84
    [true] whileTrue:[
250
a5deb61ffdac *** empty log message ***
claus
parents: 92
diff changeset
    85
	probe := (keyArray basicAt:index).
a5deb61ffdac *** empty log message ***
claus
parents: 92
diff changeset
    86
	probe == key ifTrue:[^ index].
a5deb61ffdac *** empty log message ***
claus
parents: 92
diff changeset
    87
	probe isNil ifTrue:[^ aBlock value].
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    88
250
a5deb61ffdac *** empty log message ***
claus
parents: 92
diff changeset
    89
	index == length ifTrue:[
a5deb61ffdac *** empty log message ***
claus
parents: 92
diff changeset
    90
	    index := 1
a5deb61ffdac *** empty log message ***
claus
parents: 92
diff changeset
    91
	] ifFalse:[
a5deb61ffdac *** empty log message ***
claus
parents: 92
diff changeset
    92
	    index := index + 1
a5deb61ffdac *** empty log message ***
claus
parents: 92
diff changeset
    93
	].
a5deb61ffdac *** empty log message ***
claus
parents: 92
diff changeset
    94
	index == startIndex ifTrue:[
a5deb61ffdac *** empty log message ***
claus
parents: 92
diff changeset
    95
	    ^ aBlock value
a5deb61ffdac *** empty log message ***
claus
parents: 92
diff changeset
    96
	]
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    97
    ]
a27a279701f8 Initial revision
claus
parents:
diff changeset
    98
!
a27a279701f8 Initial revision
claus
parents:
diff changeset
    99
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
   100
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
   101
    "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
   102
     If it is found, return return the index of the first unused slot. 
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
   103
     Grow the receiver, if key was not found, and no unused slots were present"
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   104
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
   105
    |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
   106
     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
   107
     startIndex probe 
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
   108
     delIndex "{ 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
   109
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
   110
    delIndex := 0.
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   111
13
62303f84ff5f *** empty log message ***
claus
parents: 10
diff changeset
   112
    length := keyArray basicSize.
362
claus
parents: 250
diff changeset
   113
    index := key identityHash.
1975
c94a8e0b0251 avoid largeIntegers
Claus Gittinger <cg@exept.de>
parents: 1972
diff changeset
   114
    index < 16r1FFFFFFF ifTrue:[
c94a8e0b0251 avoid largeIntegers
Claus Gittinger <cg@exept.de>
parents: 1972
diff changeset
   115
        index := index * 2
c94a8e0b0251 avoid largeIntegers
Claus Gittinger <cg@exept.de>
parents: 1972
diff changeset
   116
    ].
c94a8e0b0251 avoid largeIntegers
Claus Gittinger <cg@exept.de>
parents: 1972
diff changeset
   117
c94a8e0b0251 avoid largeIntegers
Claus Gittinger <cg@exept.de>
parents: 1972
diff changeset
   118
    index := index \\ length + 1.
362
claus
parents: 250
diff changeset
   119
    startIndex := index.
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   120
a27a279701f8 Initial revision
claus
parents:
diff changeset
   121
    [true] whileTrue:[
250
a5deb61ffdac *** empty log message ***
claus
parents: 92
diff changeset
   122
	probe := keyArray basicAt:index.
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
   123
	key == probe ifTrue:[^ index].
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
   124
	probe isNil ifTrue:[
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
   125
	    delIndex == 0 ifTrue:[^ index].
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
   126
	    keyArray basicAt:delIndex put:nil.
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
   127
	    ^ delIndex
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
   128
	].
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
   129
250
a5deb61ffdac *** empty log message ***
claus
parents: 92
diff changeset
   130
	probe == DeletedEntry ifTrue:[
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
   131
	    delIndex == 0 ifTrue:[
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
   132
		delIndex := index
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
   133
	    ]
250
a5deb61ffdac *** empty log message ***
claus
parents: 92
diff changeset
   134
	].
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   135
250
a5deb61ffdac *** empty log message ***
claus
parents: 92
diff changeset
   136
	index == length ifTrue:[
a5deb61ffdac *** empty log message ***
claus
parents: 92
diff changeset
   137
	    index := 1
a5deb61ffdac *** empty log message ***
claus
parents: 92
diff changeset
   138
	] ifFalse:[
a5deb61ffdac *** empty log message ***
claus
parents: 92
diff changeset
   139
	    index := index + 1
a5deb61ffdac *** empty log message ***
claus
parents: 92
diff changeset
   140
	].
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
   141
	index == startIndex ifTrue:[
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
   142
	    delIndex ~~ 0 ifTrue:[
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
   143
		keyArray basicAt:delIndex put:nil.
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
   144
		^ delIndex
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
   145
	    ].
250
a5deb61ffdac *** empty log message ***
claus
parents: 92
diff changeset
   146
	    ^ self grow 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
   147
	].
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   148
    ]
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
   149
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
   150
    "Modified: 26.3.1996 / 20:00:42 / cg"
10
claus
parents: 3
diff changeset
   151
!
claus
parents: 3
diff changeset
   152
2460
1d7caef5f5ed added #hashFor:
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
   153
hashFor:aKey
1d7caef5f5ed added #hashFor:
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
   154
    "return an initial index given a key."
1d7caef5f5ed added #hashFor:
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
   155
1d7caef5f5ed added #hashFor:
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
   156
    ^ aKey identityHash
1d7caef5f5ed added #hashFor:
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
   157
1d7caef5f5ed added #hashFor:
Claus Gittinger <cg@exept.de>
parents: 1975
diff changeset
   158
    "Created: 19.3.1997 / 15:18:59 / cg"
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   159
! !
609
12be97f6d5a7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   160
3944
541580143566 #includesIdentical: is the same as #includes:
Claus Gittinger <cg@exept.de>
parents: 2474
diff changeset
   161
!IdentitySet methodsFor:'testing'!
541580143566 #includesIdentical: is the same as #includes:
Claus Gittinger <cg@exept.de>
parents: 2474
diff changeset
   162
5559
426dee57de44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4625
diff changeset
   163
identicalContentsAs:aCollection
426dee57de44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4625
diff changeset
   164
    "return true if the receiver and aCollection represent collections
426dee57de44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4625
diff changeset
   165
     with identical contents (but not caring for order)."
426dee57de44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4625
diff changeset
   166
426dee57de44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4625
diff changeset
   167
    aCollection size == self size ifFalse:[^ false].
426dee57de44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4625
diff changeset
   168
    aCollection do:[:eachElement |
426dee57de44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4625
diff changeset
   169
        (self includesIdentical:eachElement) ifFalse:[^ false]
426dee57de44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4625
diff changeset
   170
    ].
426dee57de44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4625
diff changeset
   171
    ^ true
426dee57de44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4625
diff changeset
   172
426dee57de44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4625
diff changeset
   173
    "
426dee57de44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4625
diff changeset
   174
     |col|
426dee57de44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4625
diff changeset
   175
426dee57de44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4625
diff changeset
   176
     col := #('aaa' 'bbb' 'ccc' 'ddd').
426dee57de44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4625
diff changeset
   177
     col identicalContentsAs:(col asIdentitySet).  
426dee57de44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4625
diff changeset
   178
     col identicalContentsAs:(col copy asIdentitySet).  
426dee57de44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4625
diff changeset
   179
     col identicalContentsAs:(col deepCopy asIdentitySet).  
426dee57de44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4625
diff changeset
   180
   "
426dee57de44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4625
diff changeset
   181
!
426dee57de44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4625
diff changeset
   182
3944
541580143566 #includesIdentical: is the same as #includes:
Claus Gittinger <cg@exept.de>
parents: 2474
diff changeset
   183
includesIdentical:anObject
541580143566 #includesIdentical: is the same as #includes:
Claus Gittinger <cg@exept.de>
parents: 2474
diff changeset
   184
    "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
   185
541580143566 #includesIdentical: is the same as #includes:
Claus Gittinger <cg@exept.de>
parents: 2474
diff changeset
   186
    ^ self includes:anObject
541580143566 #includesIdentical: is the same as #includes:
Claus Gittinger <cg@exept.de>
parents: 2474
diff changeset
   187
541580143566 #includesIdentical: is the same as #includes:
Claus Gittinger <cg@exept.de>
parents: 2474
diff changeset
   188
    "Created: / 11.12.1998 / 20:01:12 / cg"
541580143566 #includesIdentical: is the same as #includes:
Claus Gittinger <cg@exept.de>
parents: 2474
diff changeset
   189
! !
541580143566 #includesIdentical: is the same as #includes:
Claus Gittinger <cg@exept.de>
parents: 2474
diff changeset
   190
634
e15218d09420 version at the end
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
   191
!IdentitySet class methodsFor:'documentation'!
e15218d09420 version at the end
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
   192
e15218d09420 version at the end
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
   193
version
5559
426dee57de44 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4625
diff changeset
   194
    ^ '$Header: /cvs/stx/stx/libbasic/IdentitySet.st,v 1.25 2000-08-22 19:52:01 cg Exp $'
634
e15218d09420 version at the end
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
   195
! !