Class ResizeableArrayList
java.lang.Object
java.util.AbstractCollection
java.util.AbstractList
java.util.ArrayList
EDU.purdue.cs.bloat.util.ResizeableArrayList
- All Implemented Interfaces:
Serializable, Cloneable, Iterable, Collection, List, RandomAccess, SequencedCollection
ResizableArrayList is the same as ArrayList except that ensureSize not only
increases the size of the array (super.ensureCapacity), but it also fills the
empty space with null. This way, the size method will return the length of
the array and not just the number of elements in it. I guess.
- See Also:
-
Field Summary
Fields inherited from class AbstractList
modCount -
Constructor Summary
ConstructorsConstructorDescriptionResizeableArrayList(int initialCapacity) This constructor is no longer supported in JDK1.2 public ResizeableArrayList(int initialCapacity, int capacityIncrement) { super(initialCapacity, capacityIncrement); } -
Method Summary
Methods inherited from class ArrayList
add, add, addAll, addAll, addFirst, addLast, clear, contains, ensureCapacity, equals, forEach, get, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeIf, removeLast, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeMethods inherited from class AbstractCollection
containsAll, toStringMethods inherited from interface Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface List
add, add, addAll, addAll, addFirst, addLast, clear, contains, containsAll, equals, get, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeLast, replaceAll, retainAll, reversed, set, size, sort, spliterator, subList, toArray, toArray
-
Constructor Details
-
ResizeableArrayList
public ResizeableArrayList(int initialCapacity) This constructor is no longer supported in JDK1.2 public ResizeableArrayList(int initialCapacity, int capacityIncrement) { super(initialCapacity, capacityIncrement); } -
ResizeableArrayList
public ResizeableArrayList() -
ResizeableArrayList
-
-
Method Details
-
ensureSize
public void ensureSize(int size) -
clone
-