org.scijava.util
Class SizableArrayList<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<E>
org.scijava.util.SizableArrayList<E>
- Type Parameters:
E - The type of data stored in the list.
- All Implemented Interfaces:
- Serializable, Cloneable, Iterable<E>, Collection<E>, List<E>, RandomAccess, Sizable
public class SizableArrayList<E>
- extends ArrayList<E>
- implements Sizable
An ArrayList whose size can be adjusted more efficiently.
When sizing down, elements at the end of the list are removed in one
operation. When sizing up, null elements are appended to the list.
- Author:
- Curtis Rueden
- See Also:
- Serialized Form
| Methods inherited from class java.util.ArrayList |
add, add, addAll, addAll, clear, clone, contains, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize |
| Methods inherited from interface org.scijava.util.Sizable |
size |
SizableArrayList
public SizableArrayList(int initialCapacity)
SizableArrayList
public SizableArrayList()
SizableArrayList
public SizableArrayList(Collection<? extends E> c)
ensureCapacity
public void ensureCapacity(int capacity)
- Overrides:
ensureCapacity in class ArrayList<E>
setSize
public void setSize(int size)
- Specified by:
setSize in interface Sizable
Copyright © 2009–2014 SciJava. All rights reserved.