Class Static


  • public class Static
    extends java.lang.Object
    Utilities.
    • 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>> toImmutableList()
      Returns a Collector that accumulates the input elements into a Guava ImmutableList via a ImmutableList.Builder.
      • Methods inherited from class java.lang.Object

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

      • toImmutableList

        public static <T> java.util.stream.Collector<T,​com.google.common.collect.ImmutableList.Builder<T>,​com.google.common.collect.ImmutableList<T>> toImmutableList()
        Returns a Collector that accumulates the input elements into a Guava ImmutableList via a ImmutableList.Builder.

        It will be obsolete when we move to Guava 21.0, which has ImmutableList.toImmutableList().

        Type Parameters:
        T - Type of the input elements
        Returns:
        a Collector that collects all the input elements into an ImmutableList, in encounter order