public static class LazyEither3.CompletableEither3<ORG,LT1,RT> extends java.lang.Object implements LazyEither3<java.lang.Throwable,LT1,RT>, Completable<ORG>
LazyEither3.CompletableEither3<ORG,LT1,RT>, LazyEither3.Lazy<ST,M,PT>, LazyEither3.Left1<ST,M,PT>, LazyEither3.Left2<ST,M,PT>, LazyEither3.Right<ST,M,PT>
Modifier and Type | Field and Description |
---|---|
java.util.concurrent.CompletableFuture<ORG> |
complete |
LazyEither3<java.lang.Throwable,LT1,RT> |
either |
Constructor and Description |
---|
CompletableEither3() |
Modifier and Type | Method and Description |
---|---|
<R1,R2> LazyEither3<java.lang.Throwable,R1,R2> |
bimap(java.util.function.Function<? super LT1,? extends R1> fn1,
java.util.function.Function<? super RT,? extends R2> fn2)
Transform this BiTransformable, changing two value types at once.
|
boolean |
complete(ORG v) |
boolean |
completeExceptionally(java.lang.Throwable error) |
Maybe<RT> |
filter(java.util.function.Predicate<? super RT> test)
Filter this Either3 resulting in a Maybe#none if it is not a Right instance or if the predicate does not
hold.
|
<R2> LazyEither3<java.lang.Throwable,LT1,R2> |
flatMap(java.util.function.Function<? super RT,? extends LazyEither3<java.lang.Throwable,LT1,? extends R2>> mapper)
Flattening transformation on this Either3.
|
<R> R |
fold(java.util.function.Function<? super RT,? extends R> present,
java.util.function.Supplier<? extends R> absent) |
<R> R |
fold(java.util.function.Function<? super java.lang.Throwable,? extends R> left1,
java.util.function.Function<? super LT1,? extends R> mid,
java.util.function.Function<? super RT,? extends R> right)
Visit the types in this Either3, only one user supplied function is executed depending on the type
|
Option<RT> |
get() |
boolean |
isDone() |
boolean |
isFailed() |
boolean |
isLeft1() |
boolean |
isLeft2() |
boolean |
isRight() |
<R> LazyEither3<java.lang.Throwable,LT1,R> |
map(java.util.function.Function<? super RT,? extends R> fn)
Transform this functor using the supplied transformation function
|
void |
subscribe(org.reactivestreams.Subscriber<? super RT> sub) |
LazyEither3<RT,LT1,java.lang.Throwable> |
swap1() |
LazyEither3<java.lang.Throwable,RT,LT1> |
swap2() |
<T> LazyEither3<java.lang.Throwable,LT1,T> |
unit(T unit) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
accumulate, always, applyAny, bipeek, coflatMap, consumeAny, either3, filter, filterNot, foldAny, forEach2, forEach3, forEach4, fromFuture, fromIterable, fromLazy, fromPublisher, later, left1, left1Eval, left2, left2Eval, narrowK, narrowK3, nest, notNull, ofType, peek, right, rightEval, sequence, sequence, toEither, toIor, toTrampoline, traverse, traverse, visitAny, visitAny, widen, zip, zip
orElseUse, orElseUse
asSupplier, collect, fold, forEach, generate, isPresent, iterate, iterator, mkString, nonEmptyList, nonEmptyListGet, orElse, orElseGet, print, print, printErr, printOut, stream, toEither, toLazyEither, toLeft, toMaybe, toOption, toOptional, toRight, toTry, toTry, toTry
public final java.util.concurrent.CompletableFuture<ORG> complete
public final LazyEither3<java.lang.Throwable,LT1,RT> either
public boolean isFailed()
isFailed
in interface Completable<ORG>
public boolean isDone()
isDone
in interface Completable<ORG>
public boolean complete(ORG v)
complete
in interface Completable<ORG>
public boolean completeExceptionally(java.lang.Throwable error)
completeExceptionally
in interface Completable<ORG>
public <R> R fold(java.util.function.Function<? super java.lang.Throwable,? extends R> left1, java.util.function.Function<? super LT1,? extends R> mid, java.util.function.Function<? super RT,? extends R> right)
LazyEither3
fold
in interface Sealed3<java.lang.Throwable,LT1,RT>
fold
in interface LazyEither3<java.lang.Throwable,LT1,RT>
left1
- Function to execute if this Either3 is a Left instancemid
- Function to execute if this Either3 is a middle instanceright
- Function to execute if this Either3 is a right instancepublic Maybe<RT> filter(java.util.function.Predicate<? super RT> test)
LazyEither3
filter
in interface Filters<RT>
filter
in interface LazyEither3<java.lang.Throwable,LT1,RT>
test
- Predicate to applyHKT to filter this Either3public <R2> LazyEither3<java.lang.Throwable,LT1,R2> flatMap(java.util.function.Function<? super RT,? extends LazyEither3<java.lang.Throwable,LT1,? extends R2>> mapper)
LazyEither3
flatMap
in interface LazyEither3<java.lang.Throwable,LT1,RT>
mapper
- Mapping functionpublic LazyEither3<java.lang.Throwable,RT,LT1> swap2()
swap2
in interface LazyEither3<java.lang.Throwable,LT1,RT>
public LazyEither3<RT,LT1,java.lang.Throwable> swap1()
swap1
in interface LazyEither3<java.lang.Throwable,LT1,RT>
public boolean isRight()
isRight
in interface LazyEither3<java.lang.Throwable,LT1,RT>
public boolean isLeft1()
isLeft1
in interface LazyEither3<java.lang.Throwable,LT1,RT>
public boolean isLeft2()
isLeft2
in interface LazyEither3<java.lang.Throwable,LT1,RT>
public <R1,R2> LazyEither3<java.lang.Throwable,R1,R2> bimap(java.util.function.Function<? super LT1,? extends R1> fn1, java.util.function.Function<? super RT,? extends R2> fn2)
BiTransformable
MapX<String,Integer> map = MapXs.of("hello",2);
MapX<String,Integer> transformedMap = map.bimap(s->s+" world",i->i*4);
//["hello world",8]
bimap
in interface BiTransformable<LT1,RT>
bimap
in interface LazyEither3<java.lang.Throwable,LT1,RT>
fn1
- transformation function for the first typefn2
- transformation function for the second typepublic <R> LazyEither3<java.lang.Throwable,LT1,R> map(java.util.function.Function<? super RT,? extends R> fn)
Transformable
of(1,2,3).map(i->i*2)
//[2,4,6]
map
in interface Transformable<RT>
map
in interface LazyEither3<java.lang.Throwable,LT1,RT>
fn
- Transformation functionpublic <T> LazyEither3<java.lang.Throwable,LT1,T> unit(T unit)
public <R> R fold(java.util.function.Function<? super RT,? extends R> present, java.util.function.Supplier<? extends R> absent)