Package com.google.common.collect
Class Lists.ReverseList<T>
java.lang.Object
java.util.AbstractCollection<T>
java.util.AbstractList<T>
com.google.common.collect.Lists.ReverseList<T>
- All Implemented Interfaces:
Iterable<T>
,Collection<T>
,List<T>
,SequencedCollection<T>
- Direct Known Subclasses:
Lists.RandomAccessReverseList
- Enclosing class:
Lists
-
Field Summary
FieldsFields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
clear()
get
(int index) iterator()
listIterator
(int index) remove
(int index) protected void
removeRange
(int fromIndex, int toIndex) private int
reverseIndex
(int index) private int
reversePosition
(int index) int
size()
subList
(int fromIndex, int toIndex) Methods inherited from class java.util.AbstractList
add, addAll, equals, hashCode, indexOf, lastIndexOf, listIterator
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
addAll, addFirst, addLast, contains, containsAll, getFirst, getLast, isEmpty, remove, removeAll, removeFirst, removeLast, replaceAll, retainAll, reversed, sort, spliterator, toArray, toArray
-
Field Details
-
forwardList
-
-
Constructor Details
-
ReverseList
-
-
Method Details
-
getForwardList
-
reverseIndex
private int reverseIndex(int index) -
reversePosition
private int reversePosition(int index) -
add
-
clear
public void clear()- Specified by:
clear
in interfaceCollection<T>
- Specified by:
clear
in interfaceList<T>
- Overrides:
clear
in classAbstractList<T>
-
remove
-
removeRange
protected void removeRange(int fromIndex, int toIndex) - Overrides:
removeRange
in classAbstractList<T>
-
set
-
get
-
size
public int size()- Specified by:
size
in interfaceCollection<T>
- Specified by:
size
in interfaceList<T>
- Specified by:
size
in classAbstractCollection<T>
-
subList
-
iterator
-
listIterator
- Specified by:
listIterator
in interfaceList<T>
- Overrides:
listIterator
in classAbstractList<T>
-