public static final class LazyEither4.Lazy<ST,M,M2,PT> extends java.lang.Object implements LazyEither4<ST,M,M2,PT>
LazyEither4.CompletableEither4<ORG,LT1,LT2,RT>, LazyEither4.Lazy<ST,M,M2,PT>, LazyEither4.Left1<ST,M,M2,PT>, LazyEither4.Left2<ST,M,M2,PT>, LazyEither4.Left3<ST,M,M2,PT>, LazyEither4.Right<ST,M,M2,PT>
Constructor and Description |
---|
Lazy() |
Modifier and Type | Method and Description |
---|---|
<R1,R2> LazyEither4<ST,M,R1,R2> |
bimap(java.util.function.Function<? super M2,? extends R1> fn1,
java.util.function.Function<? super PT,? extends R2> fn2)
Transform this BiTransformable, changing two value types at once.
|
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> LazyEither4<ST,M,M2,RT1> |
flatMap(java.util.function.Function<? super PT,? extends LazyEither4<ST,M,M2,? extends RT1>> mapper)
Flattening transformation on this Either4.
|
<R> R |
fold(java.util.function.Function<? super PT,? extends R> present,
java.util.function.Supplier<? extends R> absent) |
<R> R |
fold(java.util.function.Function<? super ST,? extends R> first,
java.util.function.Function<? super M,? extends R> second,
java.util.function.Function<? super M2,? extends R> third,
java.util.function.Function<? super PT,? extends R> primary) |
Option<PT> |
get() |
int |
hashCode() |
boolean |
isLeft1() |
boolean |
isLeft2() |
boolean |
isLeft3() |
boolean |
isRight() |
java.util.Iterator<PT> |
iterator() |
<R> LazyEither4<ST,M,M2,R> |
map(java.util.function.Function<? super PT,? extends R> mapper)
Transform this functor using the supplied transformation function
|
ReactiveSeq<PT> |
stream() |
void |
subscribe(org.reactivestreams.Subscriber<? super PT> sub) |
LazyEither4<PT,M,M2,ST> |
swap1() |
LazyEither4<ST,PT,M2,M> |
swap2() |
LazyEither4<ST,M,PT,M2> |
swap3() |
java.lang.String |
toString() |
Trampoline<LazyEither4<ST,M,M2,PT>> |
toTrampoline() |
<T> LazyEither4<ST,M,M2,T> |
unit(T unit) |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
accumulate, always, applyAny, bipeek, coflatMap, consumeAny, either4, filter, filterNot, foldAny, forEach2, forEach3, forEach4, fromFuture, fromIterable, fromLazy, fromPublisher, later, left1, left1Eval, left2, left2Eval, left3, left3Eval, narrowK, narrowK3, nest, notNull, ofType, peek, right, rightEval, sequence, sequence, toEither, toIor, traverse, traverse, visitAny, visitAny, widen, zip
orElseUse, orElseUse
asSupplier, collect, fold, forEach, generate, isPresent, iterate, mkString, nonEmptyList, nonEmptyListGet, orElse, orElseGet, print, print, printErr, printOut, toEither, toLazyEither, toLeft, toMaybe, toOption, toOptional, toRight, toTry, toTry, toTry
public <R> LazyEither4<ST,M,M2,R> map(java.util.function.Function<? super PT,? extends R> mapper)
Transformable
of(1,2,3).map(i->i*2)
//[2,4,6]
map
in interface Transformable<PT>
map
in interface LazyEither4<ST,M,M2,PT>
mapper
- Transformation functionpublic <RT1> LazyEither4<ST,M,M2,RT1> flatMap(java.util.function.Function<? super PT,? extends LazyEither4<ST,M,M2,? extends RT1>> mapper)
LazyEither4
public Maybe<PT> filter(java.util.function.Predicate<? super PT> test)
LazyEither4
public Trampoline<LazyEither4<ST,M,M2,PT>> toTrampoline()
toTrampoline
in interface LazyEither4<ST,M,M2,PT>
public ReactiveSeq<PT> stream()
public java.util.Iterator<PT> iterator()
public <R> R fold(java.util.function.Function<? super PT,? extends R> present, java.util.function.Supplier<? extends R> absent)
public final void subscribe(org.reactivestreams.Subscriber<? super PT> sub)
public <R> R fold(java.util.function.Function<? super ST,? extends R> first, java.util.function.Function<? super M,? extends R> second, java.util.function.Function<? super M2,? extends R> third, java.util.function.Function<? super PT,? extends R> primary)
public LazyEither4<ST,M,PT,M2> swap3()
public LazyEither4<ST,PT,M2,M> swap2()
public LazyEither4<PT,M,M2,ST> swap1()
public boolean isRight()
public boolean isLeft1()
public boolean isLeft2()
public boolean isLeft3()
public <R1,R2> LazyEither4<ST,M,R1,R2> bimap(java.util.function.Function<? super M2,? 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]
bimap
in interface BiTransformable<M2,PT>
bimap
in interface LazyEither4<ST,M,M2,PT>
fn1
- transformation function for the first typefn2
- transformation function for the second typepublic <T> LazyEither4<ST,M,M2,T> unit(T unit)
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object