Package io.github.connellite.collections
Class NullSkippingArrayList<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<E>
io.github.connellite.collections.NullSkippingArrayList<E>
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<E>,Collection<E>,List<E>,RandomAccess
ArrayList that ignores null on add operations (no exception, no-op).- See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
ConstructorsConstructorDescriptionNullSkippingArrayList(int initialCapacity) NullSkippingArrayList(Collection<? extends E> c) -
Method Summary
Modifier and TypeMethodDescriptionvoidInserts a non-null element at the specified index.booleanAppends a non-null element to the list.booleanaddAll(int index, Collection<? extends E> c) Inserts all non-null elements from the input collection starting at index.booleanaddAll(Collection<? extends E> c) Appends all non-null elements from the input collection.Methods inherited from class java.util.ArrayList
clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, 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
-
Constructor Details
-
NullSkippingArrayList
public NullSkippingArrayList() -
NullSkippingArrayList
public NullSkippingArrayList(int initialCapacity) -
NullSkippingArrayList
-
-
Method Details
-
add
Appends a non-null element to the list. -
add
Inserts a non-null element at the specified index. -
addAll
Appends all non-null elements from the input collection. -
addAll
Inserts all non-null elements from the input collection starting at index.
-