Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
magnusandy committed Nov 3, 2018
1 parent 6881308 commit 9726b77
Showing 1 changed file with 44 additions and 1 deletion.
45 changes: 44 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ Returns a Collector that concatenates the input elements, separated by the speci

`suffix` - the sequence of characters to be used at the end of the joined result
```typescript
Collectors.joining(delimiter: string, prefix: string, suffix: string): Collector<string, MutableString, string>;
Collectors.joining(delimiter: string, prefix: string, suffix: string): Collector<string, _, string>;
```
---

Expand Down Expand Up @@ -684,6 +684,49 @@ Collectors.groupingBy<T, K, A, D>(classifier: Function<T, K>, downstream: Collec
```
---

Returns a Collector that will return the max value as determined by the default comparator
See, `Comparator.default()`; the max value is returned in an optional, or empty if no value
was found.
```typescript
Comparator.maxBy(): Collector<I, _, Optional<I>>
```
---

Returns a Collector that will return the min value as determined by the given comparator
the min value is returned in an `Optional` an empty `Optional` if no value was found.

`comparator` - a `Comparator` for comparing elements of type I
```typescript
Collectrs.minBy<I>(comparator: Comparator<I>): Collector<I, _, Optional<I>>;
```
---

Returns a Collector that will return the min value as determined by the default comparator
See, `Comparator.default()`; the min value is returned in an `Optional`, or empty if no value
was found.
```typescript
Comparator.minBy(): Collector<I, _, Optional<I>>
```
---

Returns a Collector that will return the max value as determined by the given comparator
the max value is returned in an `Optional` an empty `Optional` if no value was found.

`comparator` - a `Comparator` for comparing elements of type I
```typescript
Collectrs.maxBy<I>(comparator: Comparator<I>): Collector<I, _, Optional<I>>;
```
---

Adapts a Collector accepting elements of type II to one accepting elements of type I by applying a mapping function to each input element before accumulation.

`mapper` - a function to be applied to the input elements

`downstream` - a collector which will accept mapped values
```typescript
Collectors.mapping<I, II, A, R>(mapper: Function<I, II>, downstream: Collector<II, A, R>): Collector<I, A, R>
```

## Functions Types and Default methods
There are several core function types that are referenced throughout the documentation as well as used within the code itself, some of these functional types have useful static methods attached to them

Expand Down

0 comments on commit 9726b77

Please sign in to comment.