public class

Transformed

extends Object
java.lang.Object
   ↳ com.atlassian.jira.util.collect.Transformed

Class Overview

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).

Summary

Public Methods
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> Entry<K, V> entry(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)
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)
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static Collection<E> collection (Collection<? extends I> collection, Function<I, E> transformer)

public static EnclosedIterable<E> enclosedIterable (EnclosedIterable<I> iterable, Function<I, E> transformer)

public static Entry<K, V> entry (Entry<? extends K, ? extends I> entry, Function<I, V> transformer)

public static Iterable<E> iterable (Iterable<I> iterable, Function<I, E> transformer)

public static 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 remove() method delegates to the supplied iterator.

public static List<E> list (List<I> set, Function<I, E> transformer)

public static Map<K, V> map (Map<K, I> map, Function<I, V> transformer)