Next: , Previous: , Up: Collection   [Index]


1.37.6 Collection: converting

asArray

Answer an Array containing all the elements in the receiver

asBag

Answer a Bag containing all the elements in the receiver

asByteArray

Answer a ByteArray containing all the elements in the receiver

asOrderedCollection

Answer an OrderedCollection containing all the elements in the receiver

asRunArray

Answer the receiver converted to a RunArray. If the receiver is not ordered the order of the elements in the RunArray might not be the #do: order.

asSet

Answer a Set containing all the elements in the receiver with no duplicates

asSortedCollection

Answer a SortedCollection containing all the elements in the receiver with the default sort block - [ :a :b | a <= b ]

asSortedCollection: aBlock

Answer a SortedCollection whose elements are the elements of the receiver, sorted according to the sort block aBlock

asString

Answer a String containing all the elements in the receiver

asUnicodeString

Answer a UnicodeString containing all the elements in the receiver