public class MappedCollection<T,K> extends Object implements Iterable<T>
| Constructor and Description |
|---|
MappedCollection(Collection<K> coll,
UnaryFunction<T,K> mapper)
Compatibility with pre 0.0.3 cnr-misc-utils.
|
MappedCollection(Iterable<K> coll,
UnaryFunction<T,K> mapper) |
MappedCollection(K[] coll,
UnaryFunction<T,K> mapper) |
| Modifier and Type | Method and Description |
|---|---|
Iterator<T> |
iterator() |
static <X,Y> List<X> |
listMap(Iterable<Y> coll,
UnaryFunction<X,Y> mapper)
Static helper function, makes common usage shorter.
|
static <X,Y> List<X> |
listMap(Y[] coll,
UnaryFunction<X,Y> mapper) |
static <X,Y> Iterable<X> |
map(Iterable<Y> coll,
UnaryFunction<X,Y> mapper)
Static helper function, makes usage shorter.
|
static <X,Y> Iterable<X> |
map(Y[] coll,
UnaryFunction<X,Y> mapper) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic MappedCollection(Collection<K> coll, UnaryFunction<T,K> mapper)
coll - mapper - public MappedCollection(Iterable<K> coll, UnaryFunction<T,K> mapper)
public MappedCollection(K[] coll, UnaryFunction<T,K> mapper)
public static <X,Y> Iterable<X> map(Iterable<Y> coll, UnaryFunction<X,Y> mapper)
X - coll - filter - public static <X,Y> Iterable<X> map(Y[] coll, UnaryFunction<X,Y> mapper)
public static <X,Y> List<X> listMap(Iterable<Y> coll, UnaryFunction<X,Y> mapper)
X - Y - coll - mapper - public static <X,Y> List<X> listMap(Y[] coll, UnaryFunction<X,Y> mapper)
Copyright © 2018. All rights reserved.