Package com.storedobject.common
Class ArrayList<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<E>
com.storedobject.common.ArrayList<E>
- Type Parameters:
E
- Element type.
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<E>
,Collection<E>
,List<E>
,RandomAccess
,SequencedCollection<E>
- Direct Known Subclasses:
ArrayListSet
,AutoCloseableList
,StringUtility.List
Enhanced array list.
- Author:
- Syam
- See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.ArrayList
(int initialCapacity) Creates an empty list for the initial capacity passed as parameterArrayList
(Collection<? extends E> c) Creates a list using specified collection elements -
Method Summary
Modifier and TypeMethodDescriptionGets the first element of a listGets the last element of a listMethods inherited from class java.util.ArrayList
add, add, addAll, addAll, addFirst, addLast, clear, clone, 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, trimToSize
Methods inherited from class java.util.AbstractCollection
containsAll, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, stream, toArray
Methods inherited from interface java.util.List
containsAll, reversed
-
Constructor Details
-
ArrayList
public ArrayList()Default constructor. -
ArrayList
public ArrayList(int initialCapacity) Creates an empty list for the initial capacity passed as parameter- Parameters:
initialCapacity
- An integer that specifies the initial capacity of the list
-
ArrayList
Creates a list using specified collection elements- Parameters:
c
- Collection
-
-
Method Details
-
firstElement
-
lastElement
-