public class EmptyList<E> extends AbstractList<E> implements RandomAccess, Serializable
Modifier and Type | Field and Description |
---|---|
static EmptyList<?> |
EMPTY |
modCount
Constructor and Description |
---|
EmptyList() |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(Object obj) |
boolean |
containsAll(Collection<?> c) |
boolean |
equals(Object o) |
void |
forEach(Consumer<? super E> action) |
E |
get(int index) |
int |
hashCode() |
Iterator<E> |
iterator() |
boolean |
removeIf(Predicate<? super E> filter) |
void |
replaceAll(UnaryOperator<E> operator) |
int |
size() |
void |
sort(Comparator<? super E> c) |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
add, add, addAll, clear, indexOf, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
addAll, isEmpty, remove, removeAll, retainAll, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addAll, isEmpty, remove, removeAll, retainAll, spliterator
parallelStream, stream
public static final EmptyList<?> EMPTY
public int size()
size
in interface Collection<E>
size
in interface List<E>
size
in class AbstractCollection<E>
public boolean contains(Object obj)
contains
in interface Collection<E>
contains
in interface List<E>
contains
in class AbstractCollection<E>
public boolean containsAll(Collection<?> c)
containsAll
in interface Collection<E>
containsAll
in interface List<E>
containsAll
in class AbstractCollection<E>
public E get(int index)
public boolean removeIf(Predicate<? super E> filter)
removeIf
in interface Collection<E>
public void replaceAll(UnaryOperator<E> operator)
replaceAll
in interface List<E>
public void sort(Comparator<? super E> c)
public boolean equals(Object o)
equals
in interface Collection<E>
equals
in interface List<E>
equals
in class AbstractList<E>
public int hashCode()
hashCode
in interface Collection<E>
hashCode
in interface List<E>
hashCode
in class AbstractList<E>
public Object[] toArray()
toArray
in interface Collection<E>
toArray
in interface List<E>
toArray
in class AbstractCollection<E>
public <T> T[] toArray(T[] a)
toArray
in interface Collection<E>
toArray
in interface List<E>
toArray
in class AbstractCollection<E>
Copyright © 2024. All rights reserved.