Package com.google.common.collect
Class Lists.TransformingRandomAccessList<F,T>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<T>
-
- com.google.common.collect.Lists.TransformingRandomAccessList<F,T>
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Iterable<T>
,java.util.Collection<T>
,java.util.List<T>
,java.util.RandomAccess
- Enclosing class:
- Lists
private static class Lists.TransformingRandomAccessList<F,T> extends java.util.AbstractList<T> implements java.util.RandomAccess, java.io.Serializable
Implementation of a transforming random access list. We try to make as many of these methods pass-through to the source list as possible so that the performance characteristics of the source list and transformed list are similar.
-
-
Constructor Summary
Constructors Constructor Description TransformingRandomAccessList(java.util.List<F> fromList, Function<? super F,? extends T> function)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
T
get(int index)
boolean
isEmpty()
java.util.Iterator<T>
iterator()
java.util.ListIterator<T>
listIterator(int index)
T
remove(int index)
boolean
removeIf(java.util.function.Predicate<? super T> filter)
int
size()
-
Methods inherited from class java.util.AbstractList
add, add, addAll, equals, hashCode, indexOf, lastIndexOf, listIterator, removeRange, set, subList
-
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, remove, removeAll, retainAll, toArray, toArray, toString
-
-
-
-
Field Detail
-
fromList
final java.util.List<F> fromList
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Method Detail
-
clear
public void clear()
-
get
public T get(int index)
-
iterator
public java.util.Iterator<T> iterator()
-
listIterator
public java.util.ListIterator<T> listIterator(int index)
-
isEmpty
public boolean isEmpty()
-
removeIf
public boolean removeIf(java.util.function.Predicate<? super T> filter)
- Specified by:
removeIf
in interfacejava.util.Collection<F>
-
remove
public T remove(int index)
-
-