Package com.google.auto.common
Class MoreStreams
- java.lang.Object
-
- com.google.auto.common.MoreStreams
-
public final class MoreStreams extends java.lang.ObjectA utility class that provides Android compatible alternatives to Guava's streaming APIs.This is useful when the Android flavor of Guava somehow finds its way onto the processor classpath.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T,K,V>
java.util.stream.Collector<T,?,com.google.common.collect.ImmutableBiMap<K,V>>toImmutableBiMap(java.util.function.Function<? super T,K> keyMapper, java.util.function.Function<? super T,V> valueMapper)Returns a collector for anImmutableBiMap.static <T> java.util.stream.Collector<T,?,com.google.common.collect.ImmutableList<T>>toImmutableList()Returns a collector for anImmutableList.static <T,K,V>
java.util.stream.Collector<T,?,com.google.common.collect.ImmutableMap<K,V>>toImmutableMap(java.util.function.Function<? super T,K> keyMapper, java.util.function.Function<? super T,V> valueMapper)Returns a collector for anImmutableMap.static <T> java.util.stream.Collector<T,?,com.google.common.collect.ImmutableSet<T>>toImmutableSet()Returns a collector for anImmutableSet.
-
-
-
Method Detail
-
toImmutableList
public static <T> java.util.stream.Collector<T,?,com.google.common.collect.ImmutableList<T>> toImmutableList()
Returns a collector for anImmutableList.
-
toImmutableSet
public static <T> java.util.stream.Collector<T,?,com.google.common.collect.ImmutableSet<T>> toImmutableSet()
Returns a collector for anImmutableSet.
-
toImmutableMap
public static <T,K,V> java.util.stream.Collector<T,?,com.google.common.collect.ImmutableMap<K,V>> toImmutableMap(java.util.function.Function<? super T,K> keyMapper, java.util.function.Function<? super T,V> valueMapper)Returns a collector for anImmutableMap.
-
toImmutableBiMap
public static <T,K,V> java.util.stream.Collector<T,?,com.google.common.collect.ImmutableBiMap<K,V>> toImmutableBiMap(java.util.function.Function<? super T,K> keyMapper, java.util.function.Function<? super T,V> valueMapper)Returns a collector for anImmutableBiMap.
-
-