public class

SortedList

extends Object
implements ISortedList<T>
java.lang.Object
   ↳ org.andengine.util.adt.list.SortedList<T extends java.lang.Comparable<T>>
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

Summary

Public Constructors
SortedList(IList<T> pList)
Public Methods
void add(T pItem)
void add(int pIndex, 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)
int size()
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.andengine.util.adt.list.IList

Public Constructors

public SortedList (IList<T> pList)

Public Methods

public void add (T pItem)

public void add (int pIndex, T pItem)

public void clear ()

public T get (int pIndex)

public int indexOf (T pItem)

public boolean isEmpty ()

public T remove (int pIndex)

public boolean remove (T pItem)

public T removeFirst ()

public T removeLast ()

public void set (int pIndex, T pItem)

public int size ()