@NonnullByDefault public final class ImmutableCollectors extends Object
Collector using Guava's immutable collections.| Modifier and Type | Method and Description |
|---|---|
static <K,V> Collector<Map.Entry<? extends K,? extends V>,ImmutableBiMap.Builder<K,V>,ImmutableBiMap<K,V>> |
toBiMap() |
static <T,K,V> Collector<T,?,ImmutableBiMap<K,V>> |
toBiMap(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends V> valueMapper) |
static <T> Collector<T,ImmutableList.Builder<T>,ImmutableList<T>> |
toList() |
static <K,V> Collector<Map.Entry<? extends K,? extends V>,ImmutableMap.Builder<K,V>,ImmutableMap<K,V>> |
toMap() |
static <T,K,V> Collector<T,ImmutableMap.Builder<K,V>,ImmutableMap<K,V>> |
toMap(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends V> valueMapper) |
static <T> Collector<T,ImmutableSet.Builder<T>,ImmutableSet<T>> |
toSet() |
static <T,K,V> Collector<T,?,ImmutableSortedMap<K,V>> |
toSortedMap(Comparator<? super K> comparator,
Function<? super T,? extends K> keyMapper,
Function<? super T,? extends V> valueMapper) |
static <E> Collector<E,?,ImmutableSortedSet<E>> |
toSortedSet(Comparator<? super E> comparator) |
public static <T> Collector<T,ImmutableList.Builder<T>,ImmutableList<T>> toList()
public static <T> Collector<T,ImmutableSet.Builder<T>,ImmutableSet<T>> toSet()
public static <K,V> Collector<Map.Entry<? extends K,? extends V>,ImmutableMap.Builder<K,V>,ImmutableMap<K,V>> toMap()
public static <K,V> Collector<Map.Entry<? extends K,? extends V>,ImmutableBiMap.Builder<K,V>,ImmutableBiMap<K,V>> toBiMap()
public static <E> Collector<E,?,ImmutableSortedSet<E>> toSortedSet(Comparator<? super E> comparator)
public static <T,K,V> Collector<T,ImmutableMap.Builder<K,V>,ImmutableMap<K,V>> toMap(Function<? super T,? extends K> keyMapper, Function<? super T,? extends V> valueMapper)
public static <T,K,V> Collector<T,?,ImmutableBiMap<K,V>> toBiMap(Function<? super T,? extends K> keyMapper, Function<? super T,? extends V> valueMapper)
public static <T,K,V> Collector<T,?,ImmutableSortedMap<K,V>> toSortedMap(Comparator<? super K> comparator, Function<? super T,? extends K> keyMapper, Function<? super T,? extends V> valueMapper)
Copyright © 2020. All rights reserved.