public class SortedList<T extends java.lang.Comparable<T>> extends java.lang.Object implements ISortedList<T>
List like behavior performs better than a plain ArrayList, since it automatically shift the contents of its internal Array only when really necessary.
Besides sparse allocations to increase the size of the internal Array, com.zynga.mobileville.path.SortedList is allocation free (unlike the LinkedList family).
(c) Zynga 2012| Constructor and Description |
|---|
SortedList(IList<T> pList) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(int pIndex,
T pItem)
Deprecated.
|
void |
add(T pItem) |
void |
clear() |
T |
get(int pIndex) |
int |
indexOf(T pItem) |
boolean |
isEmpty() |
T |
remove(int pIndex) |
boolean |
remove(T pItem) |
T |
removeFirst() |
T |
removeLast() |
void |
set(int pIndex,
T pItem)
Deprecated.
|
int |
size() |
public boolean isEmpty()
public T get(int pIndex) throws java.lang.IndexOutOfBoundsException
@Deprecated
public void set(int pIndex,
T pItem)
throws java.lang.IndexOutOfBoundsException
public int indexOf(T pItem)
@Deprecated
public void add(int pIndex,
T pItem)
public void add(T pItem)
public T removeFirst()
removeFirst in interface IList<T extends java.lang.Comparable<T>>public T removeLast()
removeLast in interface IList<T extends java.lang.Comparable<T>>public boolean remove(T pItem)
public T remove(int pIndex)