public class Transformed extends Object
Map
, Set
, and Iterator
instances.
Returned instances are unmodifiable unless otherwise noted.
All methods return implemetations that transform when iterating or retrieving elements.
This means that changes to the underlying collections will
be visible to the resulting collection (except for the Set
of course).
Modifier and Type | Method and Description |
---|---|
static <I,E> Collection<E> |
collection(Collection<? extends I> collection,
Function<I,E> transformer) |
static <I,E> EnclosedIterable<E> |
enclosedIterable(EnclosedIterable<I> iterable,
Function<I,E> transformer) |
static <K,I,V> Map.Entry<K,V> |
entry(Map.Entry<? extends K,? extends I> entry,
Function<I,V> transformer) |
static <I,E> Iterable<E> |
iterable(Iterable<I> iterable,
Function<I,E> transformer) |
static <I,E> Iterator<E> |
iterator(Iterator<? extends I> set,
Function<I,E> transformer)
|
static <I,E> List<E> |
list(List<I> set,
Function<I,E> transformer) |
static <K,I,V> Map<K,V> |
map(Map<K,I> map,
Function<I,V> transformer) |
public static <K,I,V> Map.Entry<K,V> entry(Map.Entry<? extends K,? extends I> entry, Function<I,V> transformer)
public static <I,E> Collection<E> collection(Collection<? extends I> collection, Function<I,E> transformer)
public static <I,E> EnclosedIterable<E> enclosedIterable(EnclosedIterable<I> iterable, Function<I,E> transformer)
public static <I,E> Iterator<E> iterator(Iterator<? extends I> set, Function<I,E> transformer)
Iterator
that transforms its values from one type to another using the supplied Function
.
This iterator's Iterator.remove()
method delegates to the supplied iterator.I
- E
- set
- transformer
- Copyright © 2002-2024 Atlassian. All Rights Reserved.