1548 |
1557 |
1549 ^ self asIntegerArray:LongIntegerArray |
1558 ^ self asIntegerArray:LongIntegerArray |
1550 ! |
1559 ! |
1551 |
1560 |
1552 asNewArray |
1561 asNewArray |
1553 "return a new Array with the receiver collections elements" |
1562 "return a new Array with the receiver collection's elements. |
|
1563 This method ensures that the returned collection is a new one, not |
|
1564 the same or shared with the original receiver" |
1554 |
1565 |
1555 ^ self asArray |
1566 ^ self asArray |
1556 ! |
1567 ! |
1557 |
1568 |
1558 asNewDictionary |
1569 asNewDictionary |
1559 "return a new Dictionary with the receiver collections elements" |
1570 "return a new Dictionary with the receiver collection's elements. |
|
1571 This method ensures that the returned collection is a new one, not |
|
1572 the same or shared with the original receiver" |
1560 |
1573 |
1561 ^ self asDictionary |
1574 ^ self asDictionary |
1562 ! |
1575 ! |
1563 |
1576 |
1564 asNewIdentitySet |
1577 asNewIdentitySet |
1565 "return a new IdentitySet with the receiver collections elements" |
1578 "return a new IdentitySet with the receiver collection's elements. |
|
1579 This method ensures that the returned collection is a new one, not |
|
1580 the same or shared with the original receiver" |
1566 |
1581 |
1567 ^ self asIdentitySet |
1582 ^ self asIdentitySet |
1568 ! |
1583 ! |
1569 |
1584 |
1570 asNewOrderedCollection |
1585 asNewOrderedCollection |
1571 "return a new OrderedCollection with the receiver collections elements" |
1586 "return a new OrderedCollection with the receiver collection's elements. |
|
1587 This method ensures that the returned collection is a new one, not |
|
1588 the same or shared with the original receiver" |
1572 |
1589 |
1573 ^ self asOrderedCollection |
1590 ^ self asOrderedCollection |
1574 ! |
1591 ! |
1575 |
1592 |
1576 asNewOrderedSet |
1593 asNewOrderedSet |
1577 "return a new OrderedSet with the receiver collections elements" |
1594 "return a new OrderedSet with the receiver collection's elements. |
|
1595 This method ensures that the returned collection is a new one, not |
|
1596 the same or shared with the original receiver" |
1578 |
1597 |
1579 ^ self asOrderedSet |
1598 ^ self asOrderedSet |
1580 ! |
1599 ! |
1581 |
1600 |
1582 asNewSet |
1601 asNewSet |
1583 "return a new Set with the receiver collections elements" |
1602 "return a new Set with the receiver collection's elements. |
|
1603 This method ensures that the returned collection is a new one, not |
|
1604 the same or shared with the original receiver" |
1584 |
1605 |
1585 ^ self asSet |
1606 ^ self asSet |
1586 ! |
1607 ! |
1587 |
1608 |
1588 asNilIfEmpty |
1609 asNilIfEmpty |
4744 ! ! |
4767 ! ! |
4745 |
4768 |
4746 !Collection class methodsFor:'documentation'! |
4769 !Collection class methodsFor:'documentation'! |
4747 |
4770 |
4748 version |
4771 version |
4749 ^ '$Header: /cvs/stx/stx/libbasic/Collection.st,v 1.303 2013-06-06 12:11:42 cg Exp $' |
4772 ^ '$Header: /cvs/stx/stx/libbasic/Collection.st,v 1.304 2013-06-09 13:03:50 cg Exp $' |
4750 ! |
4773 ! |
4751 |
4774 |
4752 version_CVS |
4775 version_CVS |
4753 ^ '$Header: /cvs/stx/stx/libbasic/Collection.st,v 1.303 2013-06-06 12:11:42 cg Exp $' |
4776 ^ '$Header: /cvs/stx/stx/libbasic/Collection.st,v 1.304 2013-06-09 13:03:50 cg Exp $' |
4754 ! ! |
4777 ! ! |
4755 |
4778 |
4756 |
4779 |
4757 Collection initialize! |
4780 Collection initialize! |