Next: , Up: Collection   [Index]


1.37.1 Collection class: instance creation

from: anArray

Convert anArray to an instance of the receiver. anArray is structured such that the instance can be conveniently and fully specified using brace-syntax, possibly by imposing some additional structure on anArray.

join: aCollection

Answer a collection formed by treating each element in aCollection as a ‘withAll:’ argument collection to be added to a new instance.

with: anObject

Answer a collection whose only element is anObject

with: firstObject with: secondObject

Answer a collection whose only elements are the parameters in the order they were passed

with: firstObject with: secondObject with: thirdObject

Answer a collection whose only elements are the parameters in the order they were passed

with: firstObject with: secondObject with: thirdObject with: fourthObject

Answer a collection whose only elements are the parameters in the order they were passed

with: firstObject with: secondObject with: thirdObject with: fourthObject with: fifthObject

Answer a collection whose only elements are the parameters in the order they were passed

withAll: aCollection

Answer a collection whose elements are all those in aCollection