ReadOnlySequenceableCollection.st
author Patrik Svestka <patrik.svestka@gmail.com>
Tue, 09 Apr 2019 11:34:04 +0200
branchjv
changeset 24093 0f94f6c8c9d4
parent 17911 a99f15c5efa5
permissions -rw-r--r--
Issue #269: Renaming a registry subKey via RegRenameKey() or if it fails via NtRenameKey()
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
8893
99996b25482e +isAbstract
Claus Gittinger <cg@exept.de>
parents: 8453
diff changeset
    51
!ReadOnlySequenceableCollection class methodsFor:'queries'!
99996b25482e +isAbstract
Claus Gittinger <cg@exept.de>
parents: 8453
diff changeset
    52
99996b25482e +isAbstract
Claus Gittinger <cg@exept.de>
parents: 8453
diff changeset
    53
isAbstract
99996b25482e +isAbstract
Claus Gittinger <cg@exept.de>
parents: 8453
diff changeset
    54
    ^ self == ReadOnlySequenceableCollection
99996b25482e +isAbstract
Claus Gittinger <cg@exept.de>
parents: 8453
diff changeset
    55
! !
99996b25482e +isAbstract
Claus Gittinger <cg@exept.de>
parents: 8453
diff changeset
    56
6128
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
!ReadOnlySequenceableCollection methodsFor:'blocked access'!
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    59
add:newObject
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    60
    "{ Pragma: +optSpace }"
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    61
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    62
    "catch add message - cannot add elements"
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    63
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
    self error:('elements cannot be added to ' , self classNameWithArticle)
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
    "
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
     (1 to:10) add:11   
8453
84f1e451fc26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6190
diff changeset
    68
     (1 to:10) addAll:#(11 12)   
84f1e451fc26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6190
diff changeset
    69
     (1 to:10) remove:9    
84f1e451fc26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6190
diff changeset
    70
     (1 to:10) remove:9 ifAbsent:nil   
84f1e451fc26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6190
diff changeset
    71
     (1 to:10) removeAll:#(1 4)
84f1e451fc26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6190
diff changeset
    72
     (1 to:10) atAllPut:1
6128
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
    "
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
at:index put:anObject
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
    "{ Pragma: +optSpace }"
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    78
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    79
    "catch at:put: message - cannot store elements"
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    80
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    81
    self error:('you cannot store into ' , self classNameWithArticle)
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    82
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    83
    "
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    84
     (1 to:10) at:5 put:10   
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    85
     (1 to:10) atAllPut:5   
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    86
     (1 to:10) replaceFrom:1 to:4 with:#(10 20 30 40)  
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    87
    "
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    88
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    89
    "Created: / 31.10.2001 / 10:05:36 / cg"
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    90
    "Modified: / 31.10.2001 / 10:09:19 / cg"
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    91
!
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    92
8453
84f1e451fc26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6190
diff changeset
    93
remove:anObject ifAbsent:exceptionalValue
6128
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    94
    "{ Pragma: +optSpace }"
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    95
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    96
    "catch remove message - cannot remove elements"
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    97
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    98
    self error:('elements cannot be removed from ' , self classNameWithArticle)
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    99
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   100
    "
8453
84f1e451fc26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6190
diff changeset
   101
     (1 to:10) remove:9 ifAbsent:nil  
6128
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   102
    "
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   103
! !
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   104
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   105
!ReadOnlySequenceableCollection class methodsFor:'documentation'!
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   106
3d1b57ef26ff initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   107
version
17892
d86c8bd5ece3 Merged with CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17869
diff changeset
   108
    ^ '$Header: /cvs/stx/stx/libbasic/ReadOnlySequenceableCollection.st,v 1.4 2005/06/27 10:24:03 cg Exp $'
17865
598963c6ff8e Recommited from itself
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17846
diff changeset
   109
!
598963c6ff8e Recommited from itself
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17846
diff changeset
   110
598963c6ff8e Recommited from itself
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17846
diff changeset
   111
version_SVN
17911
a99f15c5efa5 Updated with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17910
diff changeset
   112
    ^ '$Id: ReadOnlySequenceableCollection.st 10761 2012-01-19 11:46:00Z vranyj1 $'
17846
24edc476ac18 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17845
diff changeset
   113
! !
17892
d86c8bd5ece3 Merged with CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17869
diff changeset
   114
17910
8d796ca8bd1d Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17892
diff changeset
   115
17911
a99f15c5efa5 Updated with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17910
diff changeset
   116