public class LinkedArrayList extends Object
The class is non final to allow embedding it directly and thus saving on object allocation.
| Constructor and Description |
|---|
LinkedArrayList(int capacityHint)
Constructor with the capacity hint of each array segment.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(Object
Adds a new element to this list.
|
int |
capacityHint()
Returns the capacity hint that indicates the capacity of each buffer segment.
|
Object |
head()
Returns the head buffer segment or null if the list is empty.
|
int |
indexInTail()
Returns the index of the next slot in the tail buffer segment.
|
int |
size()
Returns the total size of the list.
|
Object |
tail()
Returns the tail buffer segment or null if the list is empty.
|
String |
toString()
|
public LinkedArrayList(int capacityHint)
capacityHint -
public void add(Objecto)
o - the object to add, nulls are accepted
public Object[] head()
public Object[] tail()
public int size()
public int indexInTail()
public int capacityHint()
public StringtoString()