Initializer
CeylonMutableList(JList<Element> list)
Inherited Attributes
Attributes inherited from: CeylonCollection<Element>
Attributes inherited from: CeylonList<Element>
Attributes inherited from: Object
Attributes inherited from: Collection<Element>
Attributes inherited from: Correspondence<Key,Item>
Attributes inherited from: Iterable<Element,Absent>
Attributes inherited from: List<Element>
Methods
addSource Codeshared actual void add(Element element)

Add the given element to the end of this list, incrementing the length of the list.

clearSource Codeshared actual void clear()

Remove every element from this list, leaving an empty list with no elements.

cloneSource Codeshared actual MutableList<Element> clone()

A shallow copy of this collection, that is, a collection with identical elements which does not change if this collection changes. If this collection is immutable, it is acceptable to return a reference to this collection. If this collection is mutable, a newly instantiated collection must be returned.

Refines CeylonList.clone ultimately refines Collection.clone
deleteSource Codeshared actual Element? delete(Integer index)

Remove the element at the specified index, returning the removed element, if any, or null if there was no such element.

Refines MutableList.delete ultimately refines ListMutator.delete
deleteMeasureSource Codeshared actual void deleteMeasure(Integer from, Integer length)

Remove every element with an index in the measured range from:length.

deleteSpanSource Codeshared actual void deleteSpan(Integer from, Integer to)

Remove every element with an index in the spanned range from..to.

infillSource Codeshared actual void infill(Element replacement)

Replace all null values in this list with the given replacement value.

insertSource Codeshared actual void insert(Integer index, Element element)

Insert the given element at the specified index, incrementing the length of the list.

pruneSource Codeshared actual void prune()

Remove all null elements from this list, leaving a list with no null elements.

removeSource Codeshared actual Integer remove(Element element)

Remove all occurrences of the given value from this list, returning the number of elements removed.

To remove just one occurrence of the given value, use ListMutator.removeFirst() or ListMutator.removeLast().

removeFirstSource Codeshared actual Boolean removeFirst(Element element)

Remove the first occurrence of the given value from this list, if any, returning true if the value occurs in the list, or false otherwise.

removeLastSource Codeshared actual Boolean removeLast(Element element)

Remove the last occurrence of the given value from this list, if any, returning true if the value occurs in the list, or false otherwise.

replaceSource Codeshared actual void replace(Element element, Element replacement)

Replace all occurrences of the given value in this list with the given replacement value.

To replace just one occurrence of the given value, use ListMutator.replaceFirst() or ListMutator.replaceLast().

replaceFirstSource Codeshared actual Boolean replaceFirst(Element element, Element replacement)

Replace the first occurrence of the given value in this list, if any, with the given replacement value, returning true if the value occurs in the list, or false otherwise.

replaceLastSource Codeshared actual Boolean replaceLast(Element element, Element replacement)

Replace the last occurrence of the given value in this list, if any, with the given replacement value, returning true if the value occurs in the list, or false otherwise.

setSource Codeshared actual void set(Integer index, Element element)

Replace the existing element at the specified index with the given element.

truncateSource Codeshared actual void truncate(Integer size)

Truncate this list to the given size by removing elements from the end of the list, if necessary, to leave a list with at most the given size.

Inherited Methods
Methods inherited from: CeylonCollection<Element>
Methods inherited from: CeylonList<Element>
Methods inherited from: Object
Methods inherited from: Category<Element>
Methods inherited from: Collection<Element>
Methods inherited from: Correspondence<Key,Item>
Methods inherited from: Iterable<Element,Absent>
Methods inherited from: List<Element>
Methods inherited from: ListMutator<Element>
Methods inherited from: MutableList<Element>
Methods inherited from: Ranged<Index,Element,Subrange>