A List
supporting addition, insertion, removal, and
replacement of its elements.
LinkedList
, ArrayList
no type hierarchy
Inherited Attributes |
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 | |
clone | Source Codeshared formal MutableList<Element> clone() A new list with the same elements as this list. |
delete | Source Codeshared formal Element? delete(Integer index) Remove the element at the specified Refines ListMutator.delete |
deleteFirst | Source Codeshared actual default Element? deleteFirst() Remove the element with index Refines ListMutator.deleteFirst |
deleteLast | Source Codeshared actual default Element? deleteLast() Remove the element with index Refines ListMutator.deleteLast |
move | Source Codeshared actual default void move(Integer i, Integer j) Efficiently move the element of this list at the given source index to the given destination index, shifting every element falling between the two given indices by one position to accommodate the change of position. If the source index is larger than the destination index, elements are shifted toward the end of the list. If the source index is smaller than the destination index, elements are shifted toward the start of the list. If the given indices are identical, no change is made to the list. Parameters:
Refines ListMutator.move |
swap | Source Codeshared actual default void swap(Integer i, Integer j) Given two indices within this list, swap the positions of the elements at these indices. If the two given indices are identical, no change is made to the list. Parameters:
Refines ListMutator.swap |