Collecting Results Collector Methods Flashcards

1
Q

Collector.averagingDouble() return type?

A

Double

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Collector.counting() return type?

A

Long

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Collector.groupingBy(Function f) return type?

A

Map

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Collector.joining(CharacterSequence cs ) return type?

A

String

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Collector.maxBy(Comparator c) or Collector.minBy(Comparator c) return type?

A

Optional

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Collector.mapping(Function f, Collector dc) return type?

A

Collector

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Collector.partitioningBy(Predicate p) or Collector.partitioningBy(Predicate p, Collector dc) return type?

A

Map

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Collector.summarizingDouble(ToDoubleFunction) return type?

A

DoubleSummaryStatistic

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Collector.summarizingInt(toIntFunction) return type?

A

IntSummaryStatistics

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Collector.summarizingLong(ToLongFunction) return type?

A

LongSummaryStatistics

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Collector.toList() or Collector.toSet() return type?

A

List or Set

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Collector.toCollection(Supplier s) return type?

A

Collection

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Collector.toMap(Function k, Function v),

Collector.toMap(Function k, Function v, BinaryOperator m) return type?

A

Map

How well did you know this?
1
Not at all
2
3
4
5
Perfectly