Class GuavaCollectors


  • public final class GuavaCollectors
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      GuavaCollectors()  
    • 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.Builder<T>,​com.google.common.collect.ImmutableList<T>> immutableList()
      Collect a stream of elements into an ImmutableList.
      static <T> java.util.stream.Collector<T,​com.google.common.collect.ImmutableSet.Builder<T>,​com.google.common.collect.ImmutableSet<T>> immutableSet()
      Collect a stream of elements into an ImmutableSet.
      • Methods inherited from class java.lang.Object

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

      • GuavaCollectors

        public GuavaCollectors()
    • Method Detail

      • immutableList

        public static <T> java.util.stream.Collector<T,​com.google.common.collect.ImmutableList.Builder<T>,​com.google.common.collect.ImmutableList<T>> immutableList()
        Collect a stream of elements into an ImmutableList.
      • immutableSet

        public static <T> java.util.stream.Collector<T,​com.google.common.collect.ImmutableSet.Builder<T>,​com.google.common.collect.ImmutableSet<T>> immutableSet()
        Collect a stream of elements into an ImmutableSet.