Known Direct Subclasses
|
Class Overview
This implementation is particular useful/efficient for enter/poll operations of elements that need to be sorted by natural order instead of the order they are queue.
Its 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 java.util.LinkedList family).
(c) Zynga 2012
Public Constructors
public
SortedList
(IList<T> pList)
Public Methods
public
void
add
(T pItem)
public
void
add
(int pIndex, T pItem)
public
T
get
(int pIndex)
public
int
indexOf
(T pItem)
public
boolean
isEmpty
()
public
T
remove
(int pIndex)
public
boolean
remove
(T pItem)
public
void
set
(int pIndex, T pItem)