6128
|
1 |
"{ Package: 'stx:libbasic' }"
|
|
2 |
|
|
3 |
SequenceableCollection subclass:#ReadOnlySequenceableCollection
|
|
4 |
instanceVariableNames:''
|
|
5 |
classVariableNames:''
|
|
6 |
poolDictionaries:''
|
|
7 |
category:'Collections-Abstract'
|
|
8 |
!
|
|
9 |
|
|
10 |
|
|
11 |
!ReadOnlySequenceableCollection methodsFor:'blocked access'!
|
|
12 |
|
|
13 |
add:newObject
|
|
14 |
"{ Pragma: +optSpace }"
|
|
15 |
|
|
16 |
"catch add message - cannot add elements"
|
|
17 |
|
|
18 |
self error:('elements cannot be added to ' , self classNameWithArticle)
|
|
19 |
|
|
20 |
"
|
|
21 |
(1 to:10) add:11
|
|
22 |
"
|
|
23 |
|
|
24 |
"Created: / 31.10.2001 / 10:06:44 / cg"
|
|
25 |
"Modified: / 31.10.2001 / 10:08:15 / cg"
|
|
26 |
!
|
|
27 |
|
|
28 |
at:index put:anObject
|
|
29 |
"{ Pragma: +optSpace }"
|
|
30 |
|
|
31 |
"catch at:put: message - cannot store elements"
|
|
32 |
|
|
33 |
self error:('you cannot store into ' , self classNameWithArticle)
|
|
34 |
|
|
35 |
"
|
|
36 |
(1 to:10) at:5 put:10
|
|
37 |
(1 to:10) atAllPut:5
|
|
38 |
(1 to:10) replaceFrom:1 to:4 with:#(10 20 30 40)
|
|
39 |
"
|
|
40 |
|
|
41 |
"Created: / 31.10.2001 / 10:05:36 / cg"
|
|
42 |
"Modified: / 31.10.2001 / 10:09:19 / cg"
|
|
43 |
!
|
|
44 |
|
|
45 |
remove:anObject
|
|
46 |
"{ Pragma: +optSpace }"
|
|
47 |
|
|
48 |
"catch remove message - cannot remove elements"
|
|
49 |
|
|
50 |
self error:('elements cannot be removed from ' , self classNameWithArticle)
|
|
51 |
|
|
52 |
"
|
|
53 |
(1 to:10) remove:9
|
|
54 |
"
|
|
55 |
|
|
56 |
"Created: / 31.10.2001 / 10:07:12 / cg"
|
|
57 |
"Modified: / 31.10.2001 / 10:07:29 / cg"
|
|
58 |
! !
|
|
59 |
|
|
60 |
!ReadOnlySequenceableCollection class methodsFor:'documentation'!
|
|
61 |
|
|
62 |
version
|
|
63 |
^ '$Header: /cvs/stx/stx/libbasic/ReadOnlySequenceableCollection.st,v 1.1 2001-10-31 10:03:05 cg Exp $'
|
|
64 |
! !
|