Message
|
Description
|
Notes
|
atAll: indexCollection
|
Answer a collection containing the elements of
the receiver specified by the integer elements of
the argument, indexCollection.
|
|
atAll: aCollection put:
anObject
|
Put anObject at every index specified by the
integer elements of the argument, aCollection.
|
|
atAllPut: anObject
|
Put anObject at every one of the receiver's
indices.
|
|
first
|
Answer the first element of the receiver.
(Squeak also recognizes second, third, fourth,
fifth and sixth). Signal an error if there aren't
sufficient elements in the receiver.
|
|
middle
|
Answer the median element of the receiver.
Signal an error if the receiver is empty.
|
|
last
|
Answer the last element of the receiver. Signal
an error if the receiver is empty.
|
|
allButFirst
|
Answer a collection equal to the receiver, but
without the first element. Signal an error if the
receiver is empty.
|
|
allButLast
|
Answer a collection equal to the receiver, but
without the last element. Signal an error if the
receiver is empty.
|
|
indexOf: anElement
|
Answer the index of anElement within the
receiver. If the receiver does not contain
anElement, answer 0.
|
|
indexOf: anElement ifAbsent:
exceptionBlock
|
Answer the index of anElement within the
receiver. If the receiver does not contain
anElement, answer the result of evaluating the
argument, exceptionBlock.
|
|
indexOfSubCollection: aSubCollection
startingAt: anIndex
|
Answer the index of the receiver's first
element, such that that element equals the first
element of aSubCollection, and the next elements
equal the rest of the elements of aSubCollection.
Begin the search at element anIndex of the
receiver. If no such match is found, answer 0.
|
|
indexOfSubCollection: aSubCollection
startingAt: anIndex ifAbsent:
exceptionBlock
|
Answer the index of the receiver's first
element, such that that element equals the first
element of sub, and the next elements equal the
rest of the elements of sub. Begin the search at
element start of the receiver. If no such match is
found, answer the result of evaluating argument,
exceptionBlock.
|
|
replaceFrom: start to: stop
with: replacementCollection
|
This destructively replaces elements from start
to stop in the receiver. Answer the receiver
itself. Use copyReplaceFrom:to:with: for
insertion/deletion that may alter the size of the
result.
|
|
replaceFrom: start to:
stop: with: replacementCollection
startingAt: repStart
|
This destructively replaces elements from start
to stop in the receiver starting at index,
repStart, in the sequenceable collection,
replacementCollection. Answer the receiver. No
range checks are performed.
|
|