Class Collectors3


  • public class Collectors3
    extends java.lang.Object
    Some extra Collector implementations.

    Named Collectors3 just in case Guava ever makes a Collectors2

    • Constructor Summary

      Constructors 
      Constructor Description
      Collectors3()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> java.util.stream.Collector<T,​?,​com.google.common.collect.ImmutableList<T>> toImmutableList()  
      static <K,​V>
      java.util.stream.Collector<java.util.Map.Entry<K,​V>,​?,​com.google.common.collect.ImmutableMap<K,​V>>
      toImmutableMap()  
      static <T,​K,​V>
      java.util.stream.Collector<T,​?,​com.google.common.collect.ImmutableMap<K,​V>>
      toImmutableMap​(java.util.function.Function<? super T,​? extends K> keyMapper, java.util.function.Function<? super T,​? extends V> valueMapper)  
      static <T> java.util.stream.Collector<T,​?,​com.google.common.collect.ImmutableSet<T>> toImmutableSet()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Collectors3

        public Collectors3()
    • Method Detail

      • toImmutableList

        public static <T> java.util.stream.Collector<T,​?,​com.google.common.collect.ImmutableList<T>> toImmutableList()
      • toImmutableSet

        public static <T> java.util.stream.Collector<T,​?,​com.google.common.collect.ImmutableSet<T>> toImmutableSet()
      • toImmutableMap

        public static <K,​V> java.util.stream.Collector<java.util.Map.Entry<K,​V>,​?,​com.google.common.collect.ImmutableMap<K,​V>> toImmutableMap()
      • 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,​? extends K> keyMapper,
                                                                                                                                                       java.util.function.Function<? super T,​? extends V> valueMapper)