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 o)
Adds a new element to this list.
|
Object[] |
head()
Returns the head buffer segment or null if the list is empty.
|
int |
size()
Returns the total size of the list.
|
String |
toString() |
public LinkedArrayList(int capacityHint)
capacityHint
- the expected number of elements to hold (can grow beyond that)public void add(Object o)
o
- the object to add, nulls are acceptedpublic Object[] head()
public int size()
Copyright © 2018 JBoss by Red Hat. All rights reserved.