T - The type of elements in this list.public interface ISimpleList<T>
| Modifier and Type | Method and Description |
|---|---|
void |
add(int index,
T element)
Adds an element to the list at the specified index.
|
void |
add(T element)
Adds an element to the end of the list.
|
T |
get(int index)
Returns the element at the specified index.
|
int |
indexOf(Object element)
Returns the index of the first occurrence of the specified element in the list,
or -1 if the list does not contain the element.
|
boolean |
isEmpty()
Returns
true if the list contains no elements, false otherwise. |
void |
remove(int index)
Removes the element at the specified index.
|
T |
set(int index,
T element)
Replaces the element at the specified index with the specified element.
|
int |
size()
Returns the number of elements in the list.
|
void add(T element)
element - the element to addvoid add(int index,
T element)
index - the index at which to add the elementelement - the element to addT get(int index)
index - the index of the element to returnT set(int index, T element)
index - the index of the element to replaceelement - the element to be stored at the specified indexint indexOf(Object element)
element - the element to search forvoid remove(int index)
index - the index of the element to be removedint size()
boolean isEmpty()
true if the list contains no elements, false otherwise.true if the list contains no elements, false otherwiseCopyright © 1998–2025 Apryse Group NV. All rights reserved.