equal
deleted
inserted
replaced
103 ^ self |
103 ^ self |
104 ! ! |
104 ! ! |
105 |
105 |
106 !ImmutableArray methodsFor:'copying'! |
106 !ImmutableArray methodsFor:'copying'! |
107 |
107 |
108 copyEmpty |
|
109 "when copying, return a real (mutable) Array" |
|
110 |
|
111 ^ Array new:self size |
|
112 ! |
|
113 |
|
114 copyEmptyAndGrow:size |
|
115 "when copying, return a real (mutable) Array" |
|
116 |
|
117 ^ Array new:size |
|
118 ! |
|
119 |
|
120 postCopy |
108 postCopy |
121 "when copied, make it me a real (mutable) Array" |
109 "when copied, make it me a real (mutable) Array" |
122 |
110 |
123 self changeClassTo:Array. |
111 self changeClassTo:Array. |
124 ! |
112 ! |
134 |
122 |
135 |sz| |
123 |sz| |
136 |
124 |
137 sz := self size. |
125 sz := self size. |
138 ^ (Array new:sz) |
126 ^ (Array new:sz) |
139 replaceFrom:1 to:sz with:self startingAt:1 |
127 replaceFrom:1 to:sz with:self startingAt:1 |
|
128 |
|
129 " |
|
130 #(1 2 3 4) asImmutableArray shallowCopy |
|
131 " |
140 ! ! |
132 ! ! |
141 |
133 |
142 !ImmutableArray methodsFor:'error handling'! |
134 !ImmutableArray methodsFor:'error handling'! |
143 |
135 |
144 |
136 |
183 ! ! |
175 ! ! |
184 |
176 |
185 !ImmutableArray class methodsFor:'documentation'! |
177 !ImmutableArray class methodsFor:'documentation'! |
186 |
178 |
187 version |
179 version |
188 ^ '$Header: /cvs/stx/stx/libbasic/ImmutableArray.st,v 1.29 2012/02/27 19:44:21 cg Exp $' |
180 ^ '$Header: /cvs/stx/stx/libbasic/ImmutableArray.st,v 1.30 2012/04/21 16:00:59 stefan Exp $' |
189 ! |
181 ! |
190 |
182 |
191 version_CVS |
183 version_CVS |
192 ^ '§Header: /cvs/stx/stx/libbasic/ImmutableArray.st,v 1.29 2012/02/27 19:44:21 cg Exp §' |
184 ^ '§Header: /cvs/stx/stx/libbasic/ImmutableArray.st,v 1.30 2012/04/21 16:00:59 stefan Exp §' |
193 ! |
185 ! |
194 |
186 |
195 version_SVN |
187 version_SVN |
196 ^ '$Id: ImmutableArray.st 10792 2012-03-21 17:45:38Z vranyj1 $' |
188 ^ '$Id: ImmutableArray.st 10807 2012-05-05 21:58:24Z vranyj1 $' |
197 ! ! |
189 ! ! |