public static class Either5.Left3<ST,M,M2,M3,PT> extends java.lang.Object implements Either5<ST,M,M2,M3,PT>
Either5.CompletableEither5<ORG,LT1,LT2,LT3,RT>, Either5.Lazy<ST,M,M2,M3,PT>, Either5.Left1<ST,M,M2,M3,PT>, Either5.Left2<ST,M,M2,M3,PT>, Either5.Left3<ST,M,M2,M3,PT>, Either5.Left4<ST,M,M2,M3,PT>, Either5.Right<ST,M,M2,M3,PT>
Value.ValueImpl<T>
Convertable.SupplierToConvertable<T>
Fn0.FunctionalOperations<R>, Fn0.Instances, Fn0.SupplierKind<R>
Constructor and Description |
---|
Left3() |
Modifier and Type | Method and Description |
---|---|
<R1,R2> Either5<ST,M,M2,R1,R2> |
bimap(java.util.function.Function<? super M3,? extends R1> fn1,
java.util.function.Function<? super PT,? extends R2> fn2)
Transform this BiTransformable, changing two value types at once.
|
<T2,R> Either5<ST,M,M2,M3,R> |
combine(Value<? extends T2> app,
java.util.function.BiFunction<? super PT,? super T2,? extends R> fn)
Lazily combine this ApplicativeFunctor with the supplied value via the supplied BiFunction
Example
|
boolean |
equals(java.lang.Object obj) |
Maybe<PT> |
filter(java.util.function.Predicate<? super PT> test)
Filter this Either4 resulting in a Maybe#none if it is not a Right instance or if the predicate does not
hold.
|
<RT1> Either5<ST,M,M2,M3,RT1> |
flatMap(java.util.function.Function<? super PT,? extends MonadicValue<? extends RT1>> mapper)
Flattening transformation on this Either4.
|
PT |
get() |
int |
hashCode() |
boolean |
isLeft1() |
boolean |
isLeft2() |
boolean |
isLeft3() |
boolean |
isLeft4() |
boolean |
isRight() |
java.util.Iterator<PT> |
iterator() |
<R> Either5<ST,M,M2,M3,R> |
map(java.util.function.Function<? super PT,? extends R> fn)
Transform this functor using the supplied transformation function
|
java.lang.String |
mkString()
Returns the class name and the name of the subclass, if there is any value, the value is showed between square brackets.
|
Either5<ST,M,M2,M3,PT> |
peek(java.util.function.Consumer<? super PT> action)
Peek at the current value of this Transformable, without transforming it
|
ReactiveSeq<PT> |
stream() |
void |
subscribe(org.reactivestreams.Subscriber<? super PT> s) |
Either5<PT,M,M2,M3,ST> |
swap1() |
Either5<ST,PT,M2,M3,M> |
swap2() |
Either5<ST,M,PT,M3,M2> |
swap3() |
Either5<ST,M,M2,PT,M3> |
swap4() |
boolean |
test(PT t) |
java.lang.String |
toString() |
<T> Either5<ST,M,M2,M3,T> |
unit(T unit) |
<R> R |
visit(java.util.function.Function<? super PT,? extends R> present,
java.util.function.Supplier<? extends R> absent)
The provided function is executed with the value stored in this Visitable if one is present,
otherwise the provided Supplier is executed instead.
|
<R> R |
visit(java.util.function.Function<? super ST,? extends R> secondary,
java.util.function.Function<? super M,? extends R> mid1,
java.util.function.Function<? super M2,? extends R> mid2,
java.util.function.Function<? super M3,? extends R> mid3,
java.util.function.Function<? super PT,? extends R> primary)
Visit the types in this Either4, only one user supplied function is executed depending on the type
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
accumulate, applyAny, arity, bicast, bipeek, bitrampoline, cast, coflatMap, combineEager, consumeAny, either4, either5, filterNot, flatMapI, flatMapP, flatMapS, foEval, forEach2, forEach2, forEach3, forEach3, forEach4, forEach4, fromFuture, fromIterable, fromLazy, fromMonadicValue, fromPublisher, left1, left1Eval, left2, left2Eval, left3, left3Eval, left4, left4Eval, nest, notNull, ofType, retry, retry, right, rightEval, sequence, toIor, toTrampoline, toXor, trampoline, traverse, visitAny, visitAny, zip, zip, zip, zip3, zip3, zip4, zip4, zipP, zipP, zipS, zipS, zipWith, zipWithP, zipWithS
apply, generate, iterate, newSubscriber, of, toEither, toEval, toEvalAlways, toEvalLater, toEvalNow, toLeft, toMaybe, toMaybeEager, toRight, toTry, toTry, toTry, toXor
endsWith, endsWithIterable, findAny, findFirst, firstValue, foldLeft, foldLeft, foldLeft, foldLeft, foldRight, foldRight, foldRight, foldRightMapToType, get, groupBy, join, join, join, mapReduce, mapReduce, print, print, printErr, printOut, reduce, reduce, reduce, reduce, reduce, reduce, reduce, schedule, scheduleFixedDelay, scheduleFixedRate, single, single, singleUnsafe, startsWith, startsWithIterable, takeOne, xMatch
collect, fromSupplier, isPresent, orElse, orElseGet, orElseThrow, toCompletableFuture, toCompletableFutureAsync, toFuture, toFutureAsync, toOptional, toStream
public <R> Either5<ST,M,M2,M3,R> map(java.util.function.Function<? super PT,? extends R> fn)
Transformable
of(1,2,3).map(i->i*2)
//[2,4,6]
public Either5<ST,M,M2,M3,PT> peek(java.util.function.Consumer<? super PT> action)
Transformable
of(1,2,3).map(System.out::println)
1
2
3
public Maybe<PT> filter(java.util.function.Predicate<? super PT> test)
Either5
filter
in interface Filters<PT>
filter
in interface MonadicValue<PT>
filter
in interface Either5<ST,M,M2,M3,PT>
test
- Predicate to applyHKT to filter this Either4public PT get()
get
in interface Convertable<PT>
get
in interface java.util.function.Supplier<PT>
public <RT1> Either5<ST,M,M2,M3,RT1> flatMap(java.util.function.Function<? super PT,? extends MonadicValue<? extends RT1>> mapper)
Either5
public boolean isRight()
public boolean isLeft1()
public boolean isLeft3()
public boolean isLeft4()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String mkString()
Value
public <R> R visit(java.util.function.Function<? super ST,? extends R> secondary, java.util.function.Function<? super M,? extends R> mid1, java.util.function.Function<? super M2,? extends R> mid2, java.util.function.Function<? super M3,? extends R> mid3, java.util.function.Function<? super PT,? extends R> primary)
Either5
visit
in interface Either5<ST,M,M2,M3,PT>
secondary
- Function to execute if this Either4 is a Left1 instancemid1
- Function to execute if this Either4 is a Left2 instancemid2
- Function to execute if this Either4 is a Left3 instanceprimary
- Function to execute if this Either4 is a right instancepublic <T2,R> Either5<ST,M,M2,M3,R> combine(Value<? extends T2> app, java.util.function.BiFunction<? super PT,? super T2,? extends R> fn)
MonadicValue
Maybe<Integer> some = Maybe.just(10);
just.combine(Eval.now(20), this::add);
//Some[30]
Maybe<Integer> none = Maybe.none();
none.combine(Eval.now(20), this::add);
//None
public <R1,R2> Either5<ST,M,M2,R1,R2> bimap(java.util.function.Function<? super M3,? extends R1> fn1, java.util.function.Function<? super PT,? 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]
public ReactiveSeq<PT> stream()
public java.util.Iterator<PT> iterator()
public <R> R visit(java.util.function.Function<? super PT,? extends R> present, java.util.function.Supplier<? extends R> absent)
Visitable
public void subscribe(org.reactivestreams.Subscriber<? super PT> s)
public boolean test(PT t)
public boolean isLeft2()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object