public abstract class CollUtil
extends java.lang.Object
| Constructor and Description |
|---|
CollUtil() |
| Modifier and Type | Method and Description |
|---|---|
static <T> java.util.Collection<T> |
asColl(java.lang.Object value,
java.util.Collection<T> defaulted) |
static <T> com.google.common.collect.FluentIterable<T> |
concat(java.lang.Iterable<? extends T>... inputs) |
static <T> com.google.common.collect.FluentIterable<T> |
concat(java.lang.Iterable<? extends T> a,
java.lang.Iterable<? extends T> b) |
static <E> com.google.common.collect.FluentIterable<E> |
filter(java.lang.Iterable<E> list,
com.google.common.base.Predicate<? super E> predicate) |
static <E> java.util.Collection<E> |
filterColl(java.util.Collection<E> coll,
com.google.common.base.Predicate<? super E> predicate) |
static <E> java.util.Collection<E> |
filterCollNeg(java.util.Collection<E> coll,
com.google.common.base.Predicate<? super E> pred) |
static <K,V> java.util.Map<K,V> |
filterKeys(java.util.Map<K,V> map,
com.google.common.base.Predicate<? super K> predicate) |
static <K,V> java.util.Map<K,V> |
filterKeysNeg(java.util.Map<K,V> map,
com.google.common.base.Predicate<? super K> predicate) |
static <E> com.google.common.collect.FluentIterable<E> |
filterNeg(java.lang.Iterable<E> list,
com.google.common.base.Predicate<? super E> predicate) |
static <K,V> java.util.Map<K,V> |
filterValues(java.util.Map<K,V> map,
com.google.common.base.Predicate<? super V> predicate) |
static <K,V> java.util.Map<K,V> |
filterValuesNeg(java.util.Map<K,V> map,
com.google.common.base.Predicate<? super V> pred) |
static <E> E |
firstOf(java.lang.Iterable<E> list) |
static <E> E |
firstOf(java.lang.Iterable<E> list,
E defaulted) |
static <T> com.google.common.collect.FluentIterable<T> |
fluent(java.lang.Iterable<T> list) |
static <T> T[] |
toArray(java.lang.Iterable<? extends T> iterable,
java.lang.Class<T> type) |
static <F,T> com.google.common.collect.FluentIterable<T> |
transform(java.lang.Iterable<F> list,
com.google.common.base.Function<? super F,? extends T> fn) |
static <F,T> java.util.Collection<T> |
transformColl(java.util.Collection<F> coll,
com.google.common.base.Function<? super F,T> fn) |
static <F,T> java.util.List<T> |
transformList(java.util.List<F> list,
com.google.common.base.Function<? super F,? extends T> fn) |
static <K,V> java.util.Map<K,V> |
uniqueIndex(java.lang.Iterable<V> values,
com.google.common.base.Function<? super V,K> function) |
public static <K,V> java.util.Map<K,V> filterKeys(java.util.Map<K,V> map,
com.google.common.base.Predicate<? super K> predicate)
public static <K,V> java.util.Map<K,V> filterKeysNeg(java.util.Map<K,V> map,
com.google.common.base.Predicate<? super K> predicate)
public static <K,V> java.util.Map<K,V> filterValues(java.util.Map<K,V> map,
com.google.common.base.Predicate<? super V> predicate)
public static <K,V> java.util.Map<K,V> filterValuesNeg(java.util.Map<K,V> map,
com.google.common.base.Predicate<? super V> pred)
public static <K,V> java.util.Map<K,V> uniqueIndex(java.lang.Iterable<V> values,
com.google.common.base.Function<? super V,K> function)
public static <T> java.util.Collection<T> asColl(java.lang.Object value,
java.util.Collection<T> defaulted)
public static <E> java.util.Collection<E> filterColl(java.util.Collection<E> coll,
com.google.common.base.Predicate<? super E> predicate)
public static <E> java.util.Collection<E> filterCollNeg(java.util.Collection<E> coll,
com.google.common.base.Predicate<? super E> pred)
public static <F,T> java.util.Collection<T> transformColl(java.util.Collection<F> coll,
com.google.common.base.Function<? super F,T> fn)
public static <F,T> java.util.List<T> transformList(java.util.List<F> list,
com.google.common.base.Function<? super F,? extends T> fn)
public static <T> com.google.common.collect.FluentIterable<T> fluent(java.lang.Iterable<T> list)
public static <F,T> com.google.common.collect.FluentIterable<T> transform(java.lang.Iterable<F> list,
com.google.common.base.Function<? super F,? extends T> fn)
public static <E> com.google.common.collect.FluentIterable<E> filter(java.lang.Iterable<E> list,
com.google.common.base.Predicate<? super E> predicate)
public static <E> com.google.common.collect.FluentIterable<E> filterNeg(java.lang.Iterable<E> list,
com.google.common.base.Predicate<? super E> predicate)
public static <T> com.google.common.collect.FluentIterable<T> concat(java.lang.Iterable<? extends T>... inputs)
public static <T> com.google.common.collect.FluentIterable<T> concat(java.lang.Iterable<? extends T> a,
java.lang.Iterable<? extends T> b)
public static <T> T[] toArray(java.lang.Iterable<? extends T> iterable,
java.lang.Class<T> type)
public static <E> E firstOf(java.lang.Iterable<E> list)
public static <E> E firstOf(java.lang.Iterable<E> list,
E defaulted)