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 |