public class ListenerArrayList
extends java.lang.Object
Constructor and Description |
---|
ListenerArrayList()
Creates an empty SynchronizedArrayList, with default capacity as in java.util.ArrayList
|
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
java.lang.Object object)
Adds an element at the specified position in the list
|
void |
add(java.lang.Object object)
Adds an element at the end of the list
|
void |
ensureListSize(int size)
Make sure the list is at least the specified size.
|
java.lang.Object |
get(int index)
Gets an object in the list, at the specified position
|
void |
remove(java.lang.Object object)
Removes an item from the list
|
void |
set(int index,
java.lang.Object object)
Set an element in the list at the specified index.
|
int |
size()
Gets the size of the list
|
void |
sort()
Sorts the arraylist.
|
IEventListener[] |
toArray()
Gets an array with all objects in the list.
|
public ListenerArrayList()
public java.lang.Object get(int index)
index
- The position of the object to retrievepublic void add(java.lang.Object object)
object
- The element to addpublic void add(int index, java.lang.Object object)
object
- The element to addpublic void set(int index, java.lang.Object object)
index
- The position of the object to setobject
- The object to set at the specified positionpublic int size()
public IEventListener[] toArray()
public void ensureListSize(int size)
size
- The list will be set to this size if it is not at least this size already.public void remove(java.lang.Object object)
object
- The object to removepublic void sort()
Built on October 18 2017