Module:libutilPackage:org.milescript.utilParent:CollectionGenerated by MilescriptCompiler (Copyright 2008, Point5u LLC.)

org.milescript.util.List<U>

Methods

add

void add(int index, U element)

Inserts the specified element at the specified position in this list (optional operation).

Parameters

NameTypeDescription
indexcore.int
elementU

addAll

void addAll(int index, Collection<U> c)

Inserts all of the elements in the specified collection into this list at the specified position (optional operation).

Parameters

NameTypeDescription
indexcore.int
corg.milescript.util.Collection<U>

get

U get(int index)

Returns the element at the specified position in this list.

Returns
U

Parameters

NameTypeDescription
indexcore.int

indexOf

int indexOf(U object)

Returns the index in this list of the first occurrence of the specified element, or -1 if this list does not contain this element.

Returns
core.int

Parameters

NameTypeDescription
objectU

lastIndexOf

int lastIndexOf(U object)

Returns the index in this list of the last occurrence of the specified element, or -1 if this list does not contain this element.

Returns
core.int

Parameters

NameTypeDescription
objectU

remove

U remove(int index)

Removes the element at the specified position in this list (optional operation).

Returns
U

Parameters

NameTypeDescription
indexcore.int

set

U set(int index, U element)

Replaces the element at the specified position in this list with the specified element (optional operation).

Returns
U

Parameters

NameTypeDescription
indexcore.int
elementU

subList

List<U> subList(int fromIndex, int toIndex)

Returns a view of the portion of this list between the specified fromIndex, inclusive, and toIndex, exclusive.

Returns
org.milescript.util.List<U>

Parameters

NameTypeDescription
fromIndexcore.int
toIndexcore.int