Enum Class CollectorTester.CollectStrategy

java.lang.Object
java.lang.Enum<CollectorTester.CollectStrategy>
com.google.common.testing.CollectorTester.CollectStrategy
All Implemented Interfaces:
Serializable, Comparable<CollectorTester.CollectStrategy>, Constable
Enclosing class:
CollectorTester<T,A,R>

static enum CollectorTester.CollectStrategy extends Enum<CollectorTester.CollectStrategy>
Different orderings for combining the elements of an input array, which must all produce the same result.
  • Enum Constant Details

    • SEQUENTIAL

      public static final CollectorTester.CollectStrategy SEQUENTIAL
      Get one accumulator and accumulate the elements into it sequentially.
    • MERGE_LEFT_ASSOCIATIVE

      public static final CollectorTester.CollectStrategy MERGE_LEFT_ASSOCIATIVE
      Get one accumulator for each element and merge the accumulators left-to-right.
    • MERGE_RIGHT_ASSOCIATIVE

      public static final CollectorTester.CollectStrategy MERGE_RIGHT_ASSOCIATIVE
      Get one accumulator for each element and merge the accumulators right-to-left.
  • Constructor Details

    • CollectStrategy

      private CollectStrategy()
  • Method Details

    • values

      public static CollectorTester.CollectStrategy[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static CollectorTester.CollectStrategy valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • result

      abstract <T, A, R> A result(Collector<T,A,R> collector, Iterable<T> inputs)