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
addSource Codeshared formal void add(Element element)

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

addAllSource Codeshared formal void addAll({Element*} elements)

Add the given elements to the end of this list, increasing the length of the list.

clearSource Codeshared formal void clear()

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

deleteSource Codeshared formal Anything delete(Integer index)

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

deleteFirstSource Codeshared formal Anything deleteFirst()

Remove the element with index 0 from this list, returning the removed element, or null if there was no such element.

deleteLastSource Codeshared formal Anything deleteLast()

Remove the element with index size-1 from this list, returning the removed element, or null if there was no such element.

deleteMeasureSource Codeshared formal void deleteMeasure(Integer from, Integer length)

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

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

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

infillSource Codeshared formal void infill(Element replacement)

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

Parameters:
  • replacement

    The replacement value

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

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

Throws
  • AssertionError

    if the given index is out of bounds, that is, if index<0 or if index>lastIndex+1

pruneSource Codeshared formal void prune()

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

removeSource Codeshared formal void remove(Element&Object element)

Remove all occurrences of the given value from this list.

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

Parameters:
  • element

    The non-null value to remove

removeAllSource Codeshared formal void removeAll({<Element&Object>*} elements)

Remove all occurrences of every one of the given values from this list.

Parameters:
  • elements

    The non-null values to remove

removeFirstSource Codeshared formal Boolean removeFirst(Element&Object 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.

Parameters:
  • element

    The non-null value to remove

removeLastSource Codeshared formal Boolean removeLast(Element&Object 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.

Parameters:
  • element

    The non-null value to remove

replaceSource Codeshared formal void replace(Element&Object 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 replaceFirst() or replaceLast().

Parameters:
  • element

    The non-null value to replace

  • replacement

    The replacement value

replaceFirstSource Codeshared formal Boolean replaceFirst(Element&Object 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.

Parameters:
  • element

    The non-null value to replace

  • replacement

    The replacement value

replaceLastSource Codeshared formal Boolean replaceLast(Element&Object 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.

Parameters:
  • element

    The non-null value to replace

  • replacement

    The replacement value

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

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

Throws
  • AssertionError

    if the given index is out of bounds, that is, if index<0 or if index>lastIndex

truncateSource Codeshared formal 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.

Throws
Inherited Methods
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: Ranged<Index,Element,Subrange>