Next: , Previous: OrderedCollection-accessing, Up: OrderedCollection


1.123.3 OrderedCollection: adding

add: anObject
Add anObject in the receiver, answer it


add: newObject after: oldObject
Add newObject in the receiver just after oldObject, answer it. Fail if oldObject can't be found


add: newObject afterIndex: i
Add newObject in the receiver just after the i-th, answer it. Fail if i < 0 or i > self size


add: newObject before: oldObject
Add newObject in the receiver just before oldObject, answer it. Fail if oldObject can't be found


add: newObject beforeIndex: i
Add newObject in the receiver just before the i-th, answer it. Fail if i < 1 or i > self size + 1


addAll: aCollection
Add every item of aCollection to the receiver, answer it


addAll: newCollection after: oldObject
Add every item of newCollection to the receiver just after oldObject, answer it. Fail if oldObject is not found


addAll: newCollection afterIndex: i
Add every item of newCollection to the receiver just after the i-th, answer it. Fail if i < 0 or i > self size


addAll: newCollection before: oldObject
Add every item of newCollection to the receiver just before oldObject, answer it. Fail if oldObject is not found


addAll: newCollection beforeIndex: i
Add every item of newCollection to the receiver just before the i-th, answer it. Fail if i < 1 or i > self size + 1


addAllFirst: aCollection
Add every item of newCollection to the receiver right at the start of the receiver. Answer aCollection


addAllLast: aCollection
Add every item of newCollection to the receiver right at the end of the receiver. Answer aCollection


addFirst: newObject
Add newObject to the receiver right at the start of the receiver. Answer newObject


addLast: newObject
Add newObject to the receiver right at the end of the receiver. Answer newObject