Class std.cont.List
Synopsis
public abstract class List< T > extends Container< T >
Represents an ordered list. All elements in a list can be access by their index, and elements can be appended, prepended, inserted, and so on.
Fields
Constructors
Methods
Get the element at the specified index.
Throws
IndexError | If index is out of bounds.
|
---|
Set the element at the specified index to the given value.
Throws
IndexError | If index is out of bounds.
|
---|
Get an element at the specified index. Implements the subscript-get operator.
Set the element at the specified index. Implements the subscript-set operator.
Prepend the specified element to the front of the list.
Append the specified element to the end of the list.
Remove the element at the specified index. All higher-numbered elements will thus have their indices decremented.
Insert an element at the specified index. That index becomes the index of the new element, and all elements from that index onwards have their indices incremented.
Return the size of the list.
Looks for an element and returns its index. Returns -1 if not found.
Returns true
if this list contains the specified element.