equal
deleted
inserted
replaced
419 |
419 |
420 "Modified: 12.4.1996 / 13:31:12 / cg" |
420 "Modified: 12.4.1996 / 13:31:12 / cg" |
421 ! |
421 ! |
422 |
422 |
423 contents:aCollection |
423 contents:aCollection |
424 |
424 "set my contents from aCollection |
425 ^self removeAll; addAll:aCollection |
425 - this may be redefined in a concrete subclass" |
426 |
426 |
|
427 self removeAll. |
|
428 aCollection notNil ifTrue:[ |
|
429 self addAll:aCollection |
|
430 ] |
|
431 |
|
432 "Modified: / 17.8.1998 / 10:18:43 / cg" |
427 ! |
433 ! |
428 |
434 |
429 remove:anObject |
435 remove:anObject |
430 "search for the first element, which is equal to anObject; |
436 "search for the first element, which is equal to anObject; |
431 if found, remove and return it. |
437 if found, remove and return it. |
1774 ! ! |
1780 ! ! |
1775 |
1781 |
1776 !Collection class methodsFor:'documentation'! |
1782 !Collection class methodsFor:'documentation'! |
1777 |
1783 |
1778 version |
1784 version |
1779 ^ '$Header: /cvs/stx/stx/libbasic/Collection.st,v 1.80 1998-05-20 13:29:36 cg Exp $' |
1785 ^ '$Header: /cvs/stx/stx/libbasic/Collection.st,v 1.81 1998-08-17 08:18:59 cg Exp $' |
1780 ! ! |
1786 ! ! |
1781 Collection initialize! |
1787 Collection initialize! |