public abstract class Transformations extends Object
| Modifier and Type | Method and Description |
|---|---|
static <V> com.google.common.base.Function<V,Collection<? extends V>> |
asCollection() |
static <S,D> com.google.common.base.Function<S,Collection<? extends D>> |
asCollection(com.google.common.base.Function<S,D> transformation) |
static <T> Collection<T> |
emptyIfNull(Collection<T> source) |
static <T> com.google.common.base.Optional<T> |
firstOf(Collection<T> collections) |
static <T> Collection<T> |
firstOf(Collection<T> collections,
int items) |
static <T> com.google.common.collect.ImmutableList<? extends T> |
flatmap(Collection<? extends Collection<? extends T>> collections) |
static <S,D,C extends Collection<? extends D>> |
flatmap(Collection<? extends S> source,
com.google.common.base.Function<? super S,C> transformation) |
static <T> com.google.common.collect.ImmutableList<? extends T> |
flatmap(Collection<? extends T> collection,
Collection<? extends T> otherCollection,
Collection<? extends T>... collections) |
static <S,D,C extends Iterable<? extends D>> |
flatmap(Iterable<? extends S> source,
com.google.common.base.Function<? super S,C> transformation) |
static <K extends Enum<K>,T> |
map(Class<K> enumType,
Collection<T> collection,
com.google.common.base.Function<? super T,K> keytransformation) |
static <K extends Enum<K>,V,T> |
map(Class<K> enumType,
Collection<T> collection,
com.google.common.base.Function<? super T,K> keyTransformation,
Foldleft<? super T,V> valueFold) |
static <K extends Enum<K>,V,T> |
map(Class<K> enumType,
Collection<T> collection,
com.google.common.base.Function<? super T,K> keyTransformation,
com.google.common.base.Function<? super T,V> valueTransformation) |
static <K,V> Map<K,V> |
map(Collection<Pair<K,V>> pairs) |
static <K,T> Map<K,T> |
map(Collection<T> collection,
com.google.common.base.Function<? super T,K> keytransformation) |
static <K,V,T> Map<K,V> |
map(Collection<T> collection,
com.google.common.base.Function<? super T,K> keyTransformation,
Foldleft<? super T,V> valueFold) |
static <K,V,T> Map<K,V> |
map(Collection<T> collection,
com.google.common.base.Function<? super T,K> keyTransformation,
com.google.common.base.Function<? super T,V> valueTransformation) |
static <A,B> com.google.common.base.Predicate<B> |
map(com.google.common.base.Predicate<A> predicate,
com.google.common.base.Function<B,A> transformation) |
static <V> com.google.common.base.Function<V,V> |
noop() |
static <T> Partition<T> |
partition(Collection<T> collection,
com.google.common.base.Predicate<? super T> filter) |
static <T> Partition<T> |
split(Collection<T> source,
int index) |
static <A,B> Collection<Pair<A,B>> |
zip(Iterable<A> a,
Iterable<B> b) |
static <A,B> Collection<Pair<A,B>> |
zip(Iterator<A> a,
Iterator<B> b) |
public static <T> Collection<T> emptyIfNull(Collection<T> source)
public static <S,D,C extends Collection<? extends D>> com.google.common.collect.ImmutableList<? extends D> flatmap(Collection<? extends S> source, com.google.common.base.Function<? super S,C> transformation)
public static <S,D,C extends Iterable<? extends D>> Iterable<? extends D> flatmap(Iterable<? extends S> source, com.google.common.base.Function<? super S,C> transformation)
public static <T> com.google.common.collect.ImmutableList<? extends T> flatmap(Collection<? extends Collection<? extends T>> collections)
public static <T> com.google.common.collect.ImmutableList<? extends T> flatmap(Collection<? extends T> collection, Collection<? extends T> otherCollection, Collection<? extends T>... collections)
public static <K,V> Map<K,V> map(Collection<Pair<K,V>> pairs)
public static <K,T> Map<K,T> map(Collection<T> collection, com.google.common.base.Function<? super T,K> keytransformation)
public static <K,V,T> Map<K,V> map(Collection<T> collection, com.google.common.base.Function<? super T,K> keyTransformation, com.google.common.base.Function<? super T,V> valueTransformation)
public static <K,V,T> Map<K,V> map(Collection<T> collection, com.google.common.base.Function<? super T,K> keyTransformation, Foldleft<? super T,V> valueFold)
public static <K extends Enum<K>,T> EnumMap<K,T> map(Class<K> enumType, Collection<T> collection, com.google.common.base.Function<? super T,K> keytransformation)
public static <K extends Enum<K>,V,T> EnumMap<K,V> map(Class<K> enumType, Collection<T> collection, com.google.common.base.Function<? super T,K> keyTransformation, com.google.common.base.Function<? super T,V> valueTransformation)
public static <K extends Enum<K>,V,T> EnumMap<K,V> map(Class<K> enumType, Collection<T> collection, com.google.common.base.Function<? super T,K> keyTransformation, Foldleft<? super T,V> valueFold)
public static <A,B> com.google.common.base.Predicate<B> map(com.google.common.base.Predicate<A> predicate,
com.google.common.base.Function<B,A> transformation)
public static <T> Collection<T> firstOf(Collection<T> collections, int items)
public static <T> com.google.common.base.Optional<T> firstOf(Collection<T> collections)
public static <T> Partition<T> partition(Collection<T> collection, com.google.common.base.Predicate<? super T> filter)
public static <T> Partition<T> split(Collection<T> source, int index)
public static <A,B> Collection<Pair<A,B>> zip(Iterable<A> a, Iterable<B> b)
public static <A,B> Collection<Pair<A,B>> zip(Iterator<A> a, Iterator<B> b)
public static <V> com.google.common.base.Function<V,V> noop()
public static <V> com.google.common.base.Function<V,Collection<? extends V>> asCollection()
public static <S,D> com.google.common.base.Function<S,Collection<? extends D>> asCollection(com.google.common.base.Function<S,D> transformation)
Copyright © 2014. All Rights Reserved.