Java Streams - Collectors Example








Method

  1. Collectors averagingDouble (ToDoubleFunction mapper)
  2. Collectors averagingInt(ToIntFunction mapper)
  3. Collectors averagingLong (ToLongFunction mapper)
  4. Collectors collectingAndThen (Collector downstream, Function finisher)
  5. Collectors counting()
  6. Collectors groupingByConcurrent(Function classifier)
  7. Collectors groupingByConcurrent (Function classifier, Collector downstream)
  8. Collectors groupingBy(Function classifier)
  9. Collectors groupingBy(Function classifier, Collector downstream)
  10. Collectors groupingBy(Function classifier, Supplier mapFactory, Collector downstream)
  11. Collectors joining()
  12. Collectors joining(CharSequence delimiter)
  13. Collectors joining(CharSequence delimiter, CharSequence prefix, CharSequence suffix)
  14. Collectors mapping(Function mapper, Collector downstream)
  15. Collectors maxBy(Comparator comparator)
  16. Collectors minBy(Comparator comparator)
  17. Collectors partitioningBy(Predicate predicate)
  18. Collectors partitioningBy(Predicate predicate, Collector downstream)
  19. Collectors reducing(BinaryOperator op)
  20. Collectors reducing(U identity, Function mapper, BinaryOperator op)
  21. Collectors summarizingDouble (ToDoubleFunction mapper)
  22. Collectors summarizingInt (ToIntFunction mapper)
  23. Collectors summarizingLong (ToLongFunction mapper)
  24. Collectors summingDouble (ToDoubleFunction mapper)
  25. Collectors summingInt(ToIntFunction mapper)
  26. Collectors summingLong(ToLongFunction mapper)
  27. Collectors toCollection(Supplier collectionFactory)
  28. Collectors toConcurrentMap(Function keyMapper, Function valueMapper)
  29. Collectors toConcurrentMap(Function keyMapper, Function valueMapper, BinaryOperator mergeFunction, Supplier mapSupplier)
  30. Collectors toConcurrentMap(Function keyMapper, Function valueMapper, BinaryOperator mergeFunction)
  31. Collectors toList()
  32. Collectors toMap(Function keyMapper, Function valueMapper)
  33. Collectors toMap(Function keyMapper, Function valueMapper, BinaryOperator mergeFunction)
  34. Collectors toSet()