X
- Type of source itemY
- Type of target itempublic final class Mapped<X,Y> extends Object implements Collection<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.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(Y item) |
boolean |
addAll(Collection<? extends Y> list) |
void |
clear() |
boolean |
contains(Object object) |
boolean |
containsAll(Collection<?> list) |
boolean |
isEmpty() |
Iterator<Y> |
iterator() |
boolean |
remove(Object item) |
boolean |
removeAll(Collection<?> list) |
boolean |
retainAll(Collection<?> list) |
int |
size() |
Object[] |
toArray() |
<T> T[] |
toArray(T[] array) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
equals, hashCode, parallelStream, removeIf, spliterator, stream
public Mapped(Iterable<X> src, Func<X,Y> fnc)
src
- Source collectionfnc
- Funcpublic Mapped(Collection<X> src, Func<X,Y> fnc)
src
- Source collectionfnc
- Funcpublic int size()
size
in interface Collection<Y>
public boolean isEmpty()
isEmpty
in interface Collection<Y>
public boolean contains(Object object)
contains
in interface Collection<Y>
public Object[] toArray()
toArray
in interface Collection<Y>
public <T> T[] toArray(T[] array)
toArray
in interface Collection<Y>
public boolean add(Y item)
add
in interface Collection<Y>
public boolean remove(Object item)
remove
in interface Collection<Y>
public boolean containsAll(Collection<?> list)
containsAll
in interface Collection<Y>
public boolean addAll(Collection<? extends Y> list)
addAll
in interface Collection<Y>
public boolean removeAll(Collection<?> list)
removeAll
in interface Collection<Y>
public boolean retainAll(Collection<?> list)
retainAll
in interface Collection<Y>
public void clear()
clear
in interface Collection<Y>
Copyright © 2017 Cactoos. All rights reserved.