Package io.netty.util.internal
Class RecyclableArrayList
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<Object>,Collection<Object>,List<Object>,RandomAccess,SequencedCollection<Object>
A simple list which is recyclable. This implementation does not allow
null elements to be added.- See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanbooleanaddAll(int index, Collection<?> c) booleanaddAll(Collection<?> c) booleanReturnstrueif any elements where added or set.static RecyclableArrayListCreate a new emptyRecyclableArrayListinstancestatic RecyclableArrayListnewInstance(int minCapacity) Create a new emptyRecyclableArrayListinstance with the given capacity.booleanrecycle()Clear and recycle this instance.Methods inherited from class java.util.ArrayList
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, size, sort, spliterator, subList, toArray, toArray, trimToSizeMethods inherited from class java.util.AbstractCollection
containsAll, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, stream, toArrayMethods inherited from interface java.util.List
containsAll, reversed
-
Method Details
-
newInstance
Create a new emptyRecyclableArrayListinstance -
newInstance
Create a new emptyRecyclableArrayListinstance with the given capacity. -
addAll
-
addAll
-
add
-
add
-
set
-
insertSinceRecycled
public boolean insertSinceRecycled()Returnstrueif any elements where added or set. This will be reset oncerecycle()was called. -
recycle
public boolean recycle()Clear and recycle this instance.
-