X
- Type of source itemY
- Type of target itempublic final class Mapped<X,Y> extends Object implements List<Y>
There is no thread-safety guarantee.
Constructor and Description |
---|
Mapped(Collection<X> src,
Func<X,Y> fnc)
Ctor.
|
Mapped(Iterable<X> src,
Func<X,Y> fnc)
Ctor.
|
Mapped(List<X> src,
Func<X,Y> fnc)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
Y element) |
boolean |
add(Y item) |
boolean |
addAll(Collection<? extends Y> items) |
boolean |
addAll(int index,
Collection<? extends Y> items) |
void |
clear() |
boolean |
contains(Object object) |
boolean |
containsAll(Collection<?> items) |
Y |
get(int index) |
int |
indexOf(Object item) |
boolean |
isEmpty() |
Iterator<Y> |
iterator() |
int |
lastIndexOf(Object item) |
ListIterator<Y> |
listIterator() |
ListIterator<Y> |
listIterator(int index) |
Y |
remove(int index) |
boolean |
remove(Object item) |
boolean |
removeAll(Collection<?> items) |
boolean |
retainAll(Collection<?> items) |
Y |
set(int index,
Y element) |
int |
size() |
List<Y> |
subList(int start,
int end) |
Object[] |
toArray() |
<T> T[] |
toArray(T[] array) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
equals, hashCode, replaceAll, sort, spliterator
parallelStream, removeIf, stream
public Mapped(Collection<X> src, Func<X,Y> fnc)
src
- Source listfnc
- Funcpublic int size()
public boolean isEmpty()
public boolean contains(Object object)
public Object[] toArray()
public <T> T[] toArray(T[] array)
public boolean add(Y item)
public boolean remove(Object item)
public boolean containsAll(Collection<?> items)
containsAll
in interface Collection<Y>
containsAll
in interface List<Y>
public boolean addAll(Collection<? extends Y> items)
public boolean addAll(int index, Collection<? extends Y> items)
public boolean removeAll(Collection<?> items)
public boolean retainAll(Collection<?> items)
public void clear()
public int lastIndexOf(Object item)
lastIndexOf
in interface List<Y>
public ListIterator<Y> listIterator()
listIterator
in interface List<Y>
public ListIterator<Y> listIterator(int index)
listIterator
in interface List<Y>
Copyright © 2017 Cactoos. All rights reserved.