ReadOnlySequenceableCollection.st
author Claus Gittinger <cg@exept.de>
Fri, 29 Aug 2003 21:16:52 +0200
changeset 7587 89864caa2665
parent 6190 7a793b79dc05
child 8453 84f1e451fc26
permissions -rw-r--r--
*** empty log message ***
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6190
7a793b79dc05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6128
diff changeset
     1
"
7a793b79dc05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6128
diff changeset
     2
 COPYRIGHT (c) 2001 by eXept Software AG
7a793b79dc05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6128
diff changeset
     3
              All Rights Reserved
7a793b79dc05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6128
diff changeset
     4
7a793b79dc05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6128
diff changeset
     5
 This software is furnished under a license and may be used
7a793b79dc05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6128
diff changeset
     6
 only in accordance with the terms of that license and with the
7a793b79dc05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6128
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
7a793b79dc05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6128
diff changeset
     8
 be provided or otherwise made available to, or used by, any
7a793b79dc05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6128
diff changeset
     9
 other person.  No title to or ownership of the software is
7a793b79dc05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6128
diff changeset
    10
 hereby transferred.
7a793b79dc05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6128
diff changeset
    11
"
6128
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
"{ Package: 'stx:libbasic' }"
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
SequenceableCollection subclass:#ReadOnlySequenceableCollection
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
	instanceVariableNames:''
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
	classVariableNames:''
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
	poolDictionaries:''
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
	category:'Collections-Abstract'
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
!
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
6190
7a793b79dc05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6128
diff changeset
    21
!ReadOnlySequenceableCollection class methodsFor:'documentation'!
7a793b79dc05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6128
diff changeset
    22
7a793b79dc05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6128
diff changeset
    23
copyright
7a793b79dc05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6128
diff changeset
    24
"
7a793b79dc05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6128
diff changeset
    25
 COPYRIGHT (c) 2001 by eXept Software AG
7a793b79dc05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6128
diff changeset
    26
              All Rights Reserved
7a793b79dc05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6128
diff changeset
    27
7a793b79dc05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6128
diff changeset
    28
 This software is furnished under a license and may be used
7a793b79dc05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6128
diff changeset
    29
 only in accordance with the terms of that license and with the
7a793b79dc05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6128
diff changeset
    30
 inclusion of the above copyright notice.   This software may not
7a793b79dc05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6128
diff changeset
    31
 be provided or otherwise made available to, or used by, any
7a793b79dc05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6128
diff changeset
    32
 other person.  No title to or ownership of the software is
7a793b79dc05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6128
diff changeset
    33
 hereby transferred.
7a793b79dc05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6128
diff changeset
    34
"
7a793b79dc05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6128
diff changeset
    35
!
7a793b79dc05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6128
diff changeset
    36
7a793b79dc05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6128
diff changeset
    37
documentation
7a793b79dc05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6128
diff changeset
    38
"
7a793b79dc05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6128
diff changeset
    39
    Abstract class which blocks some write access operations.
7a793b79dc05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6128
diff changeset
    40
7a793b79dc05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6128
diff changeset
    41
    See concrete subclasses (such as Interval).
7a793b79dc05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6128
diff changeset
    42
7a793b79dc05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6128
diff changeset
    43
    [author:]
7a793b79dc05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6128
diff changeset
    44
        Claus Gittinger
7a793b79dc05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6128
diff changeset
    45
7a793b79dc05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6128
diff changeset
    46
    [see also:]
7a793b79dc05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6128
diff changeset
    47
        SequenceableCollection
7a793b79dc05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6128
diff changeset
    48
"
7a793b79dc05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6128
diff changeset
    49
! !
6128
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
!ReadOnlySequenceableCollection methodsFor:'blocked access'!
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
add:newObject
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
    "{ Pragma: +optSpace }"
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
    "catch add message - cannot add elements"
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
    self error:('elements cannot be added to ' , self classNameWithArticle)
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    59
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    60
    "
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    61
     (1 to:10) add:11   
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    62
    "
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    63
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
    "Created: / 31.10.2001 / 10:06:44 / cg"
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
    "Modified: / 31.10.2001 / 10:08:15 / cg"
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
!
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
at:index put:anObject
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
    "{ Pragma: +optSpace }"
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
    "catch at:put: message - cannot store elements"
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    72
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
    self error:('you cannot store into ' , self classNameWithArticle)
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
    "
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    76
     (1 to:10) at:5 put:10   
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
     (1 to:10) atAllPut:5   
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    78
     (1 to:10) replaceFrom:1 to:4 with:#(10 20 30 40)  
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    79
    "
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    80
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    81
    "Created: / 31.10.2001 / 10:05:36 / cg"
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    82
    "Modified: / 31.10.2001 / 10:09:19 / cg"
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    83
!
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    84
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    85
remove:anObject
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    86
    "{ Pragma: +optSpace }"
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    87
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    88
    "catch remove message - cannot remove elements"
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    89
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    90
    self error:('elements cannot be removed from ' , self classNameWithArticle)
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    91
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    92
    "
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    93
     (1 to:10) remove:9   
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    94
    "
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    95
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    96
    "Created: / 31.10.2001 / 10:07:12 / cg"
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    97
    "Modified: / 31.10.2001 / 10:07:29 / cg"
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    98
! !
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    99
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   100
!ReadOnlySequenceableCollection class methodsFor:'documentation'!
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   101
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   102
version
6190
7a793b79dc05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6128
diff changeset
   103
    ^ '$Header: /cvs/stx/stx/libbasic/ReadOnlySequenceableCollection.st,v 1.2 2001-11-16 10:11:56 cg Exp $'
6128
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   104
! !