com.atlassian.jira.util.collect
Class Transformed

java.lang.Object
  extended by 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.


Method Summary
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> 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.
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)
           
static
<I,E> Set<E>
set(Set<I> set, Function<I,E> transformer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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)

set

public static <I,E> Set<E> set(Set<I> set,
                               Function<I,E> 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)

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-2012 Atlassian. All Rights Reserved.