| Constructor and Description |
|---|
FugueCollectors() |
| Modifier and Type | Method and Description |
|---|---|
static <A> Collector<Option<A>,?,List<A>> |
flatten()
Collect the values wrapped within the option.
|
static <A,B,C> Collector<Option<A>,?,C> |
flatten(Collector<A,B,C> aCollector)
Collect the values wrapped within the option.
|
static <L,R> Collector<Either<L,R>,?,Either<List<L>,R>> |
toEitherLeft()
Collect the left values if there are only lefts, otherwise return the first
right encountered.
|
static <L,R,A,B> Collector<Either<L,R>,?,Either<B,R>> |
toEitherLeft(Collector<L,A,B> lCollector)
Collect the left values if there are only lefts, otherwise return the first
right encountered.
|
static <L,R> Collector<Either<L,R>,?,Either<L,List<R>>> |
toEitherRight()
Collect the right values if there are only rights, otherwise return the
first left encountered.
|
static <L,R,A,B> Collector<Either<L,R>,?,Either<L,B>> |
toEitherRight(Collector<R,A,B> rCollector)
Collect the right values if there are only rights, otherwise return the
first left encountered.
|
static <A> Collector<Try<A>,?,Try<List<A>>> |
toTrySuccess()
Collect the right values if there are only successes, otherwise return the
first failure encountered.
|
static <A,B,C> Collector<Try<A>,?,Try<C>> |
toTrySuccess(Collector<A,B,C> aCollector)
Collect the right values if there are only successes, otherwise return the
first failure encountered.
|
public static <L,R> Collector<Either<L,R>,?,Either<List<L>,R>> toEitherLeft()
Spliterator.ORDERED sequences the left-most
Either.Right value is returned.L - the LHS typeR - the RHS typeEither.public static <L,R,A,B> Collector<Either<L,R>,?,Either<B,R>> toEitherLeft(Collector<L,A,B> lCollector)
Spliterator.ORDERED sequences the left-most
Either.Right value is returned.L - the LHS typeR - the RHS typeA - the mutable accumulation type of the reduction operationB - the result type of the reduction operationlCollector - result collectorEither.public static <L,R> Collector<Either<L,R>,?,Either<L,List<R>>> toEitherRight()
Spliterator.ORDERED sequences the left-most
Either.Left value is returned.L - the LHS typeR - the RHS typeEither.public static <L,R,A,B> Collector<Either<L,R>,?,Either<L,B>> toEitherRight(Collector<R,A,B> rCollector)
Spliterator.ORDERED sequences the left-most
Either.Left value is returned.L - the LHS typeR - the RHS typeA - the mutable accumulation type of the reduction operationB - the result type of the reduction operationrCollector - result collectorEither.public static <A> Collector<Option<A>,?,List<A>> flatten()
A - the option typeOption.public static <A,B,C> Collector<Option<A>,?,C> flatten(Collector<A,B,C> aCollector)
A - the option typeB - the mutable accumulation type of the reduction operationC - the result type of the reduction operationaCollector - result collectorOption.public static <A> Collector<Try<A>,?,Try<List<A>>> toTrySuccess()
Spliterator.ORDERED sequences the left-most
io.atlassian.fugue.Try.Failure value is returned.A - the success typeTry.public static <A,B,C> Collector<Try<A>,?,Try<C>> toTrySuccess(Collector<A,B,C> aCollector)
Spliterator.ORDERED sequences the left-most
io.atlassian.fugue.Try.Failure value is returned.A - the success typeB - the mutable accumulation type of the reduction operationC - the result type of the reduction operationTry.Copyright © 2018 Atlassian. All rights reserved.