Constructor and Description |
---|
SecureList()
Construct the secure list object
|
SecureList(List<T> source)
Construct the secure list from the java
List data type |
Modifier and Type | Method and Description |
---|---|
void |
add(T e)
Adds a new object into the list
|
void |
addAll(SecureList<T> other)
Adds the whole input list into the current list.
|
void |
clear()
Clears all items in the list
|
T |
get(int index)
Retrieves an item at the specific
index |
int |
indexOf(T e)
Retrieves the index of an item in the list (if it exists).
|
boolean |
isEmpty()
Verifies if the list is empty or not
|
T |
remove(int index)
Removes an item from the list
|
int |
size()
Retrieves the list size
|
T[] |
toArray(T[] destination)
Retrieves the array of list data
|
public void add(T e)
e
- The new objectpublic void addAll(SecureList<T> other)
other
- The other list object.public void clear()
public T get(int index)
index
index
- The item index.public int indexOf(T e)
e
- The item in the list-1
if it does not exist.public int size()
public T remove(int index)
index
- The item's indexpublic boolean isEmpty()
true
if there is no item in the list, otherwise false
.