Collecting Results Collector Methods Flashcards
Collector.averagingDouble() return type?
Double
Collector.counting() return type?
Long
Collector.groupingBy(Function f) return type?
Map
Collector.joining(CharacterSequence cs ) return type?
String
Collector.maxBy(Comparator c) or Collector.minBy(Comparator c) return type?
Optional
Collector.mapping(Function f, Collector dc) return type?
Collector
Collector.partitioningBy(Predicate p) or Collector.partitioningBy(Predicate p, Collector dc) return type?
Map
Collector.summarizingDouble(ToDoubleFunction) return type?
DoubleSummaryStatistic
Collector.summarizingInt(toIntFunction) return type?
IntSummaryStatistics
Collector.summarizingLong(ToLongFunction) return type?
LongSummaryStatistics
Collector.toList() or Collector.toSet() return type?
List or Set
Collector.toCollection(Supplier s) return type?
Collection
Collector.toMap(Function k, Function v),
Collector.toMap(Function k, Function v, BinaryOperator m) return type?
Map