author | Stefan Vogel <sv@exept.de> |
Wed, 16 Sep 2015 14:49:46 +0200 | |
changeset 18752 | b15b10e33d28 |
parent 17411 | d3afe64aadcb |
child 20632 | 7c6a436e1c89 |
permissions | -rw-r--r-- |
15143
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
1 |
" |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
2 |
COPYRIGHT (c) 2001 by eXept Software AG |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
3 |
All Rights Reserved |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
4 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
5 |
This software is furnished under a license and may be used |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
6 |
only in accordance with the terms of that license and with the |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
7 |
inclusion of the above copyright notice. This software may not |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
8 |
be provided or otherwise made available to, or used by, any |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
9 |
other person. No title to or ownership of the software is |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
10 |
hereby transferred. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
11 |
" |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
12 |
"{ Package: 'stx:libbasic' }" |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
13 |
|
17411 | 14 |
"{ NameSpace: Smalltalk }" |
15 |
||
15143
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
16 |
Set subclass:#OrderedSet |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
17 |
instanceVariableNames:'order' |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
18 |
classVariableNames:'' |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
19 |
poolDictionaries:'' |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
20 |
category:'Collections-Sequenceable' |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
21 |
! |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
22 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
23 |
!OrderedSet class methodsFor:'documentation'! |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
24 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
25 |
copyright |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
26 |
" |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
27 |
COPYRIGHT (c) 2001 by eXept Software AG |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
28 |
All Rights Reserved |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
29 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
30 |
This software is furnished under a license and may be used |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
31 |
only in accordance with the terms of that license and with the |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
32 |
inclusion of the above copyright notice. This software may not |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
33 |
be provided or otherwise made available to, or used by, any |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
34 |
other person. No title to or ownership of the software is |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
35 |
hereby transferred. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
36 |
" |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
37 |
! |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
38 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
39 |
documentation |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
40 |
" |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
41 |
I am a subclass of Set whose elements are ordered in a |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
42 |
similar fashion to OrderedCollection. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
43 |
That is, I have both Set behavior (only keeping a single instance of |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
44 |
an element) but I also remember the original order, in which elements |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
45 |
were added. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
46 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
47 |
I have one additional instance variable: |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
48 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
49 |
order <OrderedCollection> Ordered collection of values reflecting the order |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
50 |
in the set. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
51 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
52 |
[author:] |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
53 |
Claus Gittinger |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
54 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
55 |
[see also:] |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
56 |
OrderedCollection |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
57 |
Dictionary OrderedDictionary |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
58 |
Set Bag |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
59 |
" |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
60 |
! |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
61 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
62 |
examples |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
63 |
" |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
64 |
[exBegin] |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
65 |
|s| |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
66 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
67 |
s := OrderedSet new. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
68 |
s add:'one'. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
69 |
s add:'two'. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
70 |
s add:'one'. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
71 |
s add:'two'. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
72 |
s add:'three'. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
73 |
s size. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
74 |
s do:[:each | Transcript showCR:each]. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
75 |
[exEnd] |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
76 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
77 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
78 |
[exBegin] |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
79 |
|s| |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
80 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
81 |
s := OrderedSet new. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
82 |
s add:'one'. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
83 |
s add:'two'. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
84 |
s add:'one'. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
85 |
s add:'two'. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
86 |
s add:'three'. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
87 |
s remove:'one'. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
88 |
s size. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
89 |
s do:[:each | Transcript showCR:each]. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
90 |
[exEnd] |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
91 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
92 |
[exBegin] |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
93 |
|s| |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
94 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
95 |
s := OrderedSet new. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
96 |
s add:'one'. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
97 |
s addFirst:'two'. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
98 |
s addFirst:'three'. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
99 |
s add:'one'. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
100 |
s add:'two'. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
101 |
s add:'three'. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
102 |
s size. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
103 |
s do:[:each | Transcript showCR:each]. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
104 |
[exEnd] |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
105 |
" |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
106 |
! ! |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
107 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
108 |
!OrderedSet class methodsFor:'instance creation'! |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
109 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
110 |
new |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
111 |
^super new initializeOrder |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
112 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
113 |
"Created: / 16.11.2001 / 10:10:37 / cg" |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
114 |
! |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
115 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
116 |
new: anInteger |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
117 |
^(super new: anInteger) initializeOrder |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
118 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
119 |
"Created: / 16.11.2001 / 10:10:07 / cg" |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
120 |
! ! |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
121 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
122 |
!OrderedSet methodsFor:'accessing'! |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
123 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
124 |
at:index |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
125 |
"return the indexed instance variable with index, anInteger. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
126 |
Report an error, if the index is wrong." |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
127 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
128 |
^ order at:index |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
129 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
130 |
"Modified: / 16.11.2001 / 10:27:40 / cg" |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
131 |
! |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
132 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
133 |
at:index ifAbsent:exceptionalValue |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
134 |
"return the indexed instance variable with index, anInteger. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
135 |
If not present, return the value from exceptionalValue." |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
136 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
137 |
^ order at:index ifAbsent:exceptionalValue |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
138 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
139 |
"Modified: / 16.11.2001 / 10:27:40 / cg" |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
140 |
! |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
141 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
142 |
order |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
143 |
"returns the values in the order of their appearance" |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
144 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
145 |
^ order |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
146 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
147 |
" |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
148 |
|s| |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
149 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
150 |
s := OrderedSet new. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
151 |
s add:'aaa'; add:'bbb'; add:'ccc'; add:'ddd'; add:'aaa'. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
152 |
s order |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
153 |
" |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
154 |
! ! |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
155 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
156 |
!OrderedSet methodsFor:'adding & removing'! |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
157 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
158 |
add:anObject |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
159 |
"Add anObject to the receiver (if not already included). |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
160 |
Also, remember in the order (i.e. add to the end) |
15878 | 161 |
If anObject is already present in the set, |
15143
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
162 |
the order will not be changed. (See also: #addLast:)" |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
163 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
164 |
(super testAndAdd:anObject) ifFalse:[ |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
165 |
order add:anObject. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
166 |
]. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
167 |
^ anObject |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
168 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
169 |
" |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
170 |
self new |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
171 |
add:1; |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
172 |
add:2; |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
173 |
add:nil; |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
174 |
add:1; |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
175 |
yourself |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
176 |
" |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
177 |
! |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
178 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
179 |
addFirst:anObject |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
180 |
"Add anObject to the receiver (if not already included). |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
181 |
Also, remember in the order (i.e. add to the beginning)" |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
182 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
183 |
|oldObject| |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
184 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
185 |
(self includes:anObject) ifTrue:[ |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
186 |
"/ must either remove the old one from both and add the new one to both, |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
187 |
"/ or ensure that the old one is also in the order. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
188 |
"/ otherwise, the constraint that the object in the set and the one in the order |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
189 |
"/ must be identical could be broken. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
190 |
oldObject := order remove:anObject. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
191 |
] ifFalse:[ |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
192 |
oldObject := super add:anObject. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
193 |
]. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
194 |
order addFirst:oldObject. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
195 |
^ anObject |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
196 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
197 |
" |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
198 |
self new |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
199 |
addFirst:1; |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
200 |
addFirst:nil; |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
201 |
yourself |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
202 |
" |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
203 |
! |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
204 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
205 |
addLast:anObject |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
206 |
"Add anObject to the receiver (if not already included). |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
207 |
Also, remember in the order (i.e. add to the end) |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
208 |
If anAssociation is already present in the receiver, |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
209 |
it will be moved to the end. (See also: #add:)" |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
210 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
211 |
|oldObject| |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
212 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
213 |
(self includes:anObject) ifTrue:[ |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
214 |
oldObject := order remove:anObject. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
215 |
] ifFalse:[ |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
216 |
oldObject := super add:anObject. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
217 |
]. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
218 |
order add:oldObject. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
219 |
^ anObject |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
220 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
221 |
" |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
222 |
self new |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
223 |
addLast:1; |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
224 |
addLast:nil; |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
225 |
yourself |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
226 |
" |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
227 |
! |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
228 |
|
17411 | 229 |
clearContents |
230 |
"remove all elements from the receiver, but do not shrink. Returns the receiver." |
|
231 |
||
232 |
super clearContents. |
|
233 |
order clearContents. |
|
234 |
! |
|
235 |
||
15143
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
236 |
remove:oldObject ifAbsent:exceptionValueProvider |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
237 |
"remove oldObject from the collection and return it. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
238 |
If it was not in the collection return the value of exceptionValueProvider. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
239 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
240 |
WARNING: do not remove elements while iterating over the receiver." |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
241 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
242 |
|removedObject| |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
243 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
244 |
removedObject := super remove:oldObject |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
245 |
ifAbsent:[ ^ exceptionValueProvider value]. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
246 |
order removeIdentical:removedObject. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
247 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
248 |
^ removedObject |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
249 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
250 |
" |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
251 |
OrderedSet new remove:nil |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
252 |
" |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
253 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
254 |
"Modified: / 16.11.2001 / 10:21:07 / cg" |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
255 |
! |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
256 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
257 |
removeAll |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
258 |
"remove all elements from the receiver. Returns the receiver." |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
259 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
260 |
super removeAll. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
261 |
self initializeOrder. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
262 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
263 |
"Created: / 16.11.2001 / 10:21:40 / cg" |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
264 |
! |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
265 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
266 |
removeFirst |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
267 |
"remove the first object from the collection and return it. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
268 |
If it was not in the collection, raise an error. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
269 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
270 |
WARNING: do not remove elements while iterating over the receiver." |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
271 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
272 |
^ self removeFirstIfAbsent:[self emptyCollectionError]. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
273 |
! |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
274 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
275 |
removeFirstIfAbsent:exceptionalValue |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
276 |
"remove the first object from the collection and return it. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
277 |
If it was not in the collection, return the value from exceptionalValue. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
278 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
279 |
WARNING: do not remove elements while iterating over the receiver." |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
280 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
281 |
|element| |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
282 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
283 |
order isEmpty ifTrue:[^ exceptionalValue value]. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
284 |
element := order first. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
285 |
^ self remove:element. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
286 |
! |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
287 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
288 |
removeLast |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
289 |
"remove the last object from the collection and return it. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
290 |
If it was not in the collection, raise an error. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
291 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
292 |
WARNING: do not remove elements while iterating over the receiver." |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
293 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
294 |
^ self removeLastIfAbsent:[self emptyCollectionError]. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
295 |
! |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
296 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
297 |
removeLastIfAbsent:exceptionalValue |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
298 |
"remove the last object from the collection and return it. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
299 |
If it was not in the collection, return the value from exceptionalValue. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
300 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
301 |
WARNING: do not remove elements while iterating over the receiver." |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
302 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
303 |
|lastElement| |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
304 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
305 |
order isEmpty ifTrue:[^ exceptionalValue value]. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
306 |
lastElement := order last. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
307 |
^ self remove:lastElement. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
308 |
! |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
309 |
|
16516 | 310 |
safeRemove:oldObject ifAbsent:exceptionValueProvider |
15143
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
311 |
"remove the element, oldObject from the collection. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
312 |
Return the element |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
313 |
(could be non-identical to oldObject, since I hash on equality, not on identity). |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
314 |
If it was not in the collection return the value of exceptionValueProvider. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
315 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
316 |
In contrast to #remove:, this does not resize the underlying collection |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
317 |
and therefore does NOT rehash & change the elements order. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
318 |
Therefor this can be used while enumerating the receiver, |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
319 |
which is not possible if #remove: is used. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
320 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
321 |
WARNING: since no resizing is done, the physical amount of memory used |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
322 |
by the container remains the same, although the logical size shrinks. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
323 |
You may want to manually resize the receiver using #emptyCheck. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
324 |
(after the loop)" |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
325 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
326 |
|removedObject| |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
327 |
|
16516 | 328 |
removedObject := super safeRemove:oldObject ifAbsent:[^ exceptionValueProvider value]. |
15143
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
329 |
order removeIdentical:removedObject. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
330 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
331 |
^ removedObject |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
332 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
333 |
"Created: / 16.11.2001 / 10:23:48 / cg" |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
334 |
"Modified: / 16.11.2001 / 10:24:03 / cg" |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
335 |
! |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
336 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
337 |
testAndAdd:anObject |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
338 |
"add the argument, anObject to the receiver. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
339 |
Answer true, if the element did already exist in the collection, |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
340 |
false otherwise. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
341 |
Also, remember in the order (i.e. add to the end) |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
342 |
If anObject is already present in the set, |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
343 |
the order will not be changed. (See also: #addLast:)" |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
344 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
345 |
(super testAndAdd:anObject) ifFalse:[ |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
346 |
order add:anObject. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
347 |
^ false. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
348 |
]. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
349 |
^ true |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
350 |
! ! |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
351 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
352 |
!OrderedSet methodsFor:'converting'! |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
353 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
354 |
asNewOrderedSet |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
355 |
"make sure to return a unique new set" |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
356 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
357 |
"could be an instance of a subclass..." |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
358 |
self class == OrderedSet ifTrue:[ |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
359 |
^ self copy |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
360 |
]. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
361 |
^ super asOrderedSet |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
362 |
! |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
363 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
364 |
asOrderedSet |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
365 |
"make sure to return a unique new set" |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
366 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
367 |
"could be an instance of a subclass..." |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
368 |
self class == OrderedSet ifTrue:[ |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
369 |
^ self. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
370 |
]. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
371 |
^ super asOrderedSet |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
372 |
! ! |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
373 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
374 |
!OrderedSet methodsFor:'copying'! |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
375 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
376 |
postCopy |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
377 |
"have to copy the keyArray too" |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
378 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
379 |
super postCopy. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
380 |
order := order copy. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
381 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
382 |
"Created: / 16.11.2001 / 10:28:50 / cg" |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
383 |
! ! |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
384 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
385 |
!OrderedSet methodsFor:'enumerating'! |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
386 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
387 |
do:aBlock |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
388 |
"Evaluate aBlock for each of the sets's values |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
389 |
in the order they have been added." |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
390 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
391 |
order do:aBlock |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
392 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
393 |
"Modified: / 16.11.2001 / 10:04:00 / cg" |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
394 |
! |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
395 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
396 |
doWithIndex:aBlock |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
397 |
"Squeak/V'Age compatibility; |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
398 |
Evaluate aBlock for each of the sets's values and index |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
399 |
in the order they have been added." |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
400 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
401 |
order doWithIndex:aBlock |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
402 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
403 |
"Created: / 09-11-2010 / 16:09:17 / cg" |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
404 |
! |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
405 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
406 |
reverseDo:aBlock |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
407 |
"Evaluate aBlock for each of the sets's values |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
408 |
in the reverse order they have been added." |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
409 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
410 |
order reverseDo:aBlock |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
411 |
! ! |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
412 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
413 |
!OrderedSet methodsFor:'initialization'! |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
414 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
415 |
initializeOrder |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
416 |
order := OrderedCollection new |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
417 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
418 |
"Created: / 16.11.2001 / 10:06:05 / cg" |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
419 |
! ! |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
420 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
421 |
!OrderedSet methodsFor:'searching'! |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
422 |
|
16809 | 423 |
findFirst:aBlock ifNone:exceptionValue |
424 |
"find the index of the first element, for which evaluation of the argument, aBlock returns true; |
|
425 |
return its index or the value from exceptionValue if none detected. |
|
426 |
This is much like #detect:ifNone:, however, here an INDEX is returned, |
|
427 |
while #detect:ifNone: returns the element." |
|
428 |
||
429 |
^ order findFirst:aBlock ifNone:exceptionValue. |
|
430 |
! |
|
431 |
||
15143
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
432 |
indexOf:anObject |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
433 |
^ order indexOf:anObject. |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
434 |
! ! |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
435 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
436 |
!OrderedSet class methodsFor:'documentation'! |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
437 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
438 |
version |
17411 | 439 |
^ '$Header: /cvs/stx/stx/libbasic/OrderedSet.st,v 1.28 2015-02-04 19:59:46 stefan Exp $' |
15143
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
440 |
! |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
441 |
|
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
442 |
version_CVS |
17411 | 443 |
^ '$Header: /cvs/stx/stx/libbasic/OrderedSet.st,v 1.28 2015-02-04 19:59:46 stefan Exp $' |
15143
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
444 |
! ! |
7a1e2ff50fd5
Change package libbasic2 -> libbasic
Stefan Vogel <sv@exept.de>
parents:
diff
changeset
|
445 |