Category: Collections-Sequenceable
Superclass: SequenceableCollection
My instances are objects that are generally fixed size, and are accessed by an integer index. The ordering of my instance's elements is determined externally; I will not rearrange the order of the elements.

Method category index

instance creation (class)
basic (instance)
built ins (instance)
compiler (instance)
copying Collections (instance)
enumerating the elements of a collection (instance)
sorting (instance)
storing (instance)
streams (instance)

instance creation (class)

join: aCollection
Where aCollection is a collection of SequenceableCollections, answer a new instance with all the elements therein, in order.

join: aCollection separatedBy: sepCollection

Where aCollection is a collection of SequenceableCollections, answer a new instance with all the elements therein, in order, each separated by an occurrence of sepCollection.

new: size withAll: anObject

Answer a collection with the given size, whose elements are all set to anObject

streamContents: aBlock

Create a ReadWriteStream on an empty instance of the receiver; pass the stream to aBlock, then retrieve its contents and answer them.

with: element1

Answer a collection whose only element is element1

with: element1 with: element2

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

with: element1 with: element2 with: element3

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

with: element1 with: element2 with: element3 with: element4

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

with: element1 with: element2 with: element3 with: element4 with: element5

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

withAll: aCollection

Answer a collection whose elements are the same as those in aCollection

top


basic (instance)

, aSequenceableCollection
Answer a new instance of an ArrayedCollection containing all the elements in the receiver, followed by all the elements in aSequenceableCollection

add: value

This method should not be called for instances of this class.

atAll: keyCollection

Answer a collection of the same kind returned by #collect:, that only includes the values at the given indices. Fail if any of the values in keyCollection is out of bounds for the receiver.

copyFrom: start to: stop

Answer a new collection containing all the items in the receiver from the start-th and to the stop-th

copyWith: anElement

Answer a new instance of an ArrayedCollection containing all the elements in the receiver, followed by the single item anElement

copyWithout: oldElement

Answer a copy of the receiver to which all occurrences of oldElement are removed

top


built ins (instance)

size
Answer the size of the receiver

top


compiler (instance)

literalEquals: anObject
Not commented.

literalHash

Not commented.

top


copying Collections (instance)

copyReplaceAll: oldSubCollection with: newSubCollection
Answer a new collection in which all the sequences matching oldSubCollection are replaced with newSubCollection

copyReplaceFrom: start to: stop with: replacementCollection

Answer a new collection of the same class as the receiver that contains the same elements as the receiver, in the same order, except for elements from index `start' to index `stop'. If start < stop, these are replaced by the contents of the replacementCollection. Instead, If start = (stop + 1), like in `copyReplaceFrom: 4 to: 3 with: anArray', then every element of the receiver will be present in the answered copy; the operation will be an append if stop is equal to the size of the receiver or, if it is not, an insert before index `start'.

copyReplaceFrom: start to: stop withObject: anObject

Answer a new collection of the same class as the receiver that contains the same elements as the receiver, in the same order, except for elements from index `start' to index `stop'. If start < stop, these are replaced by stop-start+1 copies of anObject. Instead, If start = (stop + 1), then every element of the receiver will be present in the answered copy; the operation will be an append if stop is equal to the size of the receiver or, if it is not, an insert before index `start'.

reverse

Answer the receivers' contents in reverse order

top


enumerating the elements of a collection (instance)

collect: aBlock
Answer a new instance of an ArrayedCollection containing all the results of evaluating aBlock passing each of the receiver's elements

reject: aBlock

Answer a new instance of an ArrayedCollection containing all the elements in the receiver which, when passed to aBlock, answer false

select: aBlock

Answer a new instance of an ArrayedCollection containing all the elements in the receiver which, when passed to aBlock, answer true

with: aSequenceableCollection collect: aBlock

Evaluate aBlock for each pair of elements took respectively from the receiver and from aSequenceableCollection; answer a collection of the same kind of the receiver, made with the block's return values. Fail if the receiver has not the same size as aSequenceableCollection.

top


sorting (instance)

sorted
Return a copy of the receiver sorted according to the default sort block, which uses #<= to compare items.

sorted: sortBlock

Return a copy of the receiver sorted according to the given sort block, which accepts pair of items and returns true if the first item is less than the second one.

top


storing (instance)

storeOn: aStream
Store Smalltalk code compiling to the receiver on aStream

top


streams (instance)

writeStream
Answer a WriteStream streaming on the receiver

top