public abstract class AbstractNonSequentialResultList extends AbstractResultList
AbstractList
, this class doesn't rely on the
Collection.size()
method.Constructor and Description |
---|
AbstractNonSequentialResultList() |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(Object o) |
boolean |
containsAll(Collection c) |
Object |
get(int index) |
protected abstract Object |
getInternal(int index)
Implement this method and
List.size() . |
int |
indexOf(Object o) |
boolean |
isEmpty() |
Iterator |
iterator() |
int |
lastIndexOf(Object o) |
ListIterator |
listIterator() |
ListIterator |
listIterator(int index) |
List |
subList(int fromIndex,
int toIndex) |
Object[] |
toArray() |
Object[] |
toArray(Object[] a) |
add, add, addAll, addAll, assertOpen, clear, getUserObject, remove, remove, removeAll, retainAll, set, setUserObject
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, isClosed, isProviderOpen
equals, hashCode, replaceAll, size, sort, spliterator
parallelStream, removeIf, stream
protected static final Object PAST_END
protected abstract Object getInternal(int index)
List.size()
. Return PAST_END
if the index is out of bounds.public boolean contains(Object o)
public boolean containsAll(Collection c)
public Object get(int index)
public int indexOf(Object o)
public int lastIndexOf(Object o)
public boolean isEmpty()
public Iterator iterator()
public ListIterator listIterator()
public ListIterator listIterator(int index)
public Object[] toArray()
public List subList(int fromIndex, int toIndex)
Copyright © 2006–2022 Apache Software Foundation. All rights reserved.