F
- backing list element typeT
- transformed list element typepublic final class TransformingRandomAccessList<F,T> extends AbstractList<T> implements RandomAccess
modCount
Constructor and Description |
---|
TransformingRandomAccessList(@NonNull List<F> fromList,
@NonNull Function<? super F,? extends T> toFunction,
@NonNull Function<? super T,? extends F> fromFunction)
Create a new
TransformingRandomAccessList . |
Modifier and Type | Method and Description |
---|---|
void |
add(int i,
T t) |
void |
clear() |
T |
get(int index) |
boolean |
isEmpty() |
@NotNull Iterator<T> |
iterator() |
@NotNull ListIterator<T> |
listIterator(int index) |
T |
remove(int index) |
boolean |
removeIf(Predicate<? super T> filter) |
T |
set(int i,
T t) |
int |
size() |
add, addAll, equals, hashCode, indexOf, lastIndexOf, listIterator, removeRange, subList
addAll, contains, containsAll, remove, removeAll, retainAll, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addAll, contains, containsAll, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
parallelStream, stream
public TransformingRandomAccessList(@NonNull List<F> fromList, @NonNull Function<? super F,? extends T> toFunction, @NonNull Function<? super T,? extends F> fromFunction)
TransformingRandomAccessList
.fromList
- backing listtoFunction
- function mapping backing list element type to transformed list element typefromFunction
- function mapping transformed list element type to backing list element typepublic void clear()
clear
in interface Collection<T>
clear
in interface List<T>
clear
in class AbstractList<T>
public T get(int index)
@NotNull public @NotNull ListIterator<T> listIterator(int index)
listIterator
in interface List<T>
listIterator
in class AbstractList<T>
public boolean isEmpty()
isEmpty
in interface Collection<T>
isEmpty
in interface List<T>
isEmpty
in class AbstractCollection<T>
public boolean removeIf(Predicate<? super T> filter)
removeIf
in interface Collection<T>
public T remove(int index)
public int size()
size
in interface Collection<T>
size
in interface List<T>
size
in class AbstractCollection<T>
Copyright © 2021. All rights reserved.