com.atlassian.jira.util.collect
Class Transformed
java.lang.Object
com.atlassian.jira.util.collect.Transformed
public class Transformed
- extends Object
Static factory for creating transformed 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).
Method Summary |
static
|
collection(Collection<? extends I> collection,
Function<I,E> transformer)
|
static
|
enclosedIterable(EnclosedIterable<I> iterable,
Function<I,E> transformer)
|
static
|
entry(Map.Entry<? extends K,? extends I> entry,
Function<I,V> transformer)
|
static
|
iterable(Iterable<I> iterable,
Function<I,E> transformer)
|
static
|
iterator(Iterator<? extends I> set,
Function<I,E> transformer)
Iterator that transforms its values from one type to another using the supplied Function . |
static
|
list(List<I> set,
Function<I,E> transformer)
|
static
|
map(Map<K,I> map,
Function<I,V> transformer)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
map
public static <K,I,V> Map<K,V> map(Map<K,I> map,
Function<I,V> transformer)
entry
public static <K,I,V> Map.Entry<K,V> entry(Map.Entry<? extends K,? extends I> entry,
Function<I,V> transformer)
list
public static <I,E> List<E> list(List<I> set,
Function<I,E> transformer)
collection
public static <I,E> Collection<E> collection(Collection<? extends I> collection,
Function<I,E> transformer)
enclosedIterable
public static <I,E> EnclosedIterable<E> enclosedIterable(EnclosedIterable<I> iterable,
Function<I,E> transformer)
iterable
public static <I,E> Iterable<E> iterable(Iterable<I> iterable,
Function<I,E> transformer)
iterator
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.
- Type Parameters:
I
- E
- - Parameters:
set
- transformer
-
- Returns:
Copyright © 2002-2013 Atlassian. All Rights Reserved.