public class NullList<E>
extends java.lang.Object
implements java.util.List<E>
Modifier and Type | Field and Description |
---|---|
static java.util.List |
NULL_LIST |
Constructor and Description |
---|
NullList() |
Modifier and Type | Method and Description |
---|---|
boolean |
add(E e) |
void |
add(int index,
E element) |
boolean |
addAll(java.util.Collection<? extends E> c) |
boolean |
addAll(int index,
java.util.Collection<? extends E> c) |
void |
clear() |
boolean |
contains(java.lang.Object o) |
boolean |
containsAll(java.util.Collection<?> c) |
boolean |
equals(java.lang.Object o) |
E |
get(int index) |
int |
hashCode() |
int |
indexOf(java.lang.Object o) |
boolean |
isEmpty() |
java.util.Iterator<E> |
iterator() |
int |
lastIndexOf(java.lang.Object o) |
java.util.ListIterator<E> |
listIterator() |
java.util.ListIterator<E> |
listIterator(int index) |
java.util.stream.Stream<E> |
parallelStream() |
E |
remove(int index) |
boolean |
remove(java.lang.Object o) |
boolean |
removeAll(java.util.Collection<?> c) |
boolean |
removeIf(java.util.function.Predicate<? super E> filter) |
void |
replaceAll(java.util.function.UnaryOperator<E> operator) |
boolean |
retainAll(java.util.Collection<?> c) |
E |
set(int index,
E element) |
int |
size() |
void |
sort(java.util.Comparator<? super E> c) |
java.util.Spliterator<E> |
spliterator() |
java.util.stream.Stream<E> |
stream() |
java.util.List<E> |
subList(int fromIndex,
int toIndex) |
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
public int size()
public boolean isEmpty()
public boolean contains(java.lang.Object o)
public java.util.Iterator<E> iterator()
public java.lang.Object[] toArray()
public <T> T[] toArray(T[] a)
public boolean add(E e)
public boolean remove(java.lang.Object o)
public boolean containsAll(java.util.Collection<?> c)
public boolean addAll(java.util.Collection<? extends E> c)
public boolean addAll(int index, java.util.Collection<? extends E> c)
addAll
in interface java.util.List<E>
public boolean removeAll(java.util.Collection<?> c)
public boolean retainAll(java.util.Collection<?> c)
public void replaceAll(java.util.function.UnaryOperator<E> operator)
replaceAll
in interface java.util.List<E>
public boolean removeIf(java.util.function.Predicate<? super E> filter)
removeIf
in interface java.util.Collection<E>
public void sort(java.util.Comparator<? super E> c)
sort
in interface java.util.List<E>
public void clear()
public boolean equals(java.lang.Object o)
public int hashCode()
public java.util.stream.Stream<E> stream()
stream
in interface java.util.Collection<E>
public java.util.stream.Stream<E> parallelStream()
parallelStream
in interface java.util.Collection<E>
public int indexOf(java.lang.Object o)
indexOf
in interface java.util.List<E>
public int lastIndexOf(java.lang.Object o)
lastIndexOf
in interface java.util.List<E>
public java.util.ListIterator<E> listIterator()
listIterator
in interface java.util.List<E>
public java.util.ListIterator<E> listIterator(int index)
listIterator
in interface java.util.List<E>
public java.util.List<E> subList(int fromIndex, int toIndex)
subList
in interface java.util.List<E>