OrderedCollection.st
changeset 15442 5ae3f8265977
parent 15401 813953f5abf3
child 15660 3143ca7c443a
child 18070 d262e3aecaca
equal deleted inserted replaced
15441:5a7d4a7de37d 15442:5ae3f8265977
   475     "add all elements of the argument, aCollection to the receiver. 
   475     "add all elements of the argument, aCollection to the receiver. 
   476      Returns the argument, aCollection (sigh)."
   476      Returns the argument, aCollection (sigh)."
   477 
   477 
   478     self addAll:aCollection beforeIndex:(1 + self size).
   478     self addAll:aCollection beforeIndex:(1 + self size).
   479     ^ aCollection
   479     ^ aCollection
       
   480 !
       
   481 
       
   482 addAll:aCollection afterIndex:index
       
   483     "insert the argument, anObject to become located after index.
       
   484      Return the receiver (sigh - ST-80 compatibility)."
       
   485 
       
   486     ^ self addAll:aCollection beforeIndex:(index + 1)
       
   487 
       
   488     "
       
   489      |c|
       
   490      c := #(4 3 2 1) asOrderedCollection.
       
   491      c addAll:#(10 20 30) afterIndex:2           
       
   492     "
       
   493     "
       
   494      |c|
       
   495      c := #(4 3 2 1) asOrderedCollection.
       
   496      c addAll:#(10 20 30) afterIndex:4           
       
   497     "
       
   498     "
       
   499      |c|
       
   500      c := #(4 3 2 1) asOrderedCollection.
       
   501      c addAll:#(10 20 30) afterIndex:0           
       
   502     "
       
   503 
       
   504     "Modified: 12.4.1996 / 13:52:41 / cg"
   480 !
   505 !
   481 
   506 
   482 addAll:aCollection beforeIndex:index
   507 addAll:aCollection beforeIndex:index
   483     "insert all elements of the argument, anObject to become located at index.
   508     "insert all elements of the argument, anObject to become located at index.
   484      The collection may be unordered, but then order of the sliced-in elements
   509      The collection may be unordered, but then order of the sliced-in elements
  1417         ]
  1442         ]
  1418     ]
  1443     ]
  1419 ! !
  1444 ! !
  1420 
  1445 
  1421 
  1446 
       
  1447 
  1422 !OrderedCollection methodsFor:'private'!
  1448 !OrderedCollection methodsFor:'private'!
  1423 
  1449 
  1424 initContents:size
  1450 initContents:size
  1425     "setup the receiver-collection to hold size entries"
  1451     "setup the receiver-collection to hold size entries"
  1426 
  1452 
  1965 ! !
  1991 ! !
  1966 
  1992 
  1967 !OrderedCollection class methodsFor:'documentation'!
  1993 !OrderedCollection class methodsFor:'documentation'!
  1968 
  1994 
  1969 version
  1995 version
  1970     ^ '$Header: /cvs/stx/stx/libbasic/OrderedCollection.st,v 1.106 2013-06-17 21:15:10 cg Exp $'
  1996     ^ '$Header: /cvs/stx/stx/libbasic/OrderedCollection.st,v 1.107 2013-06-28 08:35:54 cg Exp $'
  1971 ! !
  1997 ! !
  1972 
  1998