Uses of Interface
org.organicdesign.fp.oneOf.Or
-
Packages that use Or Package Description org.organicdesign.fp.collections Type-safe versions of immutable collections (mostly from Clojure), plus unmodifiable and immutable collection interfaces that fit these collections into the java.util interfaces.org.organicdesign.fp.oneOf This package contains Option which has Some() and None() which is useful for indicating "Not-Found" or "End-of-stream/file".org.organicdesign.fp.xform Immutable descriptions of data transformations (Transformable), and a highly efficient single-pass, short-circuiting implementation that carries out those transforms in a single pass (Xform). -
-
Uses of Or in org.organicdesign.fp.collections
Methods in org.organicdesign.fp.collections that return Or Modifier and Type Method Description default <G,B>
@NotNull Or<G,B>UnmodIterable. foldUntil(G accum, @Nullable Fn2<? super G,? super T,B> terminator, @NotNull Fn2<? super G,? super T,G> reducer)
Normally you want to terminate by doing a take(), drop(), or takeWhile() before you get to the fold, but if you need to terminate based on the complete result so far, you can provide your own termination condition to this version of fold(). -
Uses of Or in org.organicdesign.fp.oneOf
Classes in org.organicdesign.fp.oneOf that implement Or Modifier and Type Class Description static class
Or.Bad<G,B>
Represents the presence of a Bad value (and absence of a Good).static class
Or.Good<G,B>
Represents the presence of a Good value (and absence of a Bad).Methods in org.organicdesign.fp.oneOf that return Or Modifier and Type Method Description static <G,B>
@NotNull Or<G,B>Or. bad(B bad)
Construct a new Bad from the given object.static <G,B>
@NotNull Or<G,B>Or. good(G good)
Construct a new Good from the given object. -
Uses of Or in org.organicdesign.fp.xform
Methods in org.organicdesign.fp.xform that return Or Modifier and Type Method Description <G,B>
@NotNull Or<G,B>Transformable. foldUntil(G accum, @Nullable Fn2<? super G,? super T,B> terminator, @NotNull Fn2<? super G,? super T,G> reducer)
Normally you want to terminate by doing a take(), drop(), or takeWhile() before you get to the fold, but if you need to terminate based on the complete result so far, you can provide your own termination condition to this version of fold().<G,B>
@NotNull Or<G,B>Xform. foldUntil(G accum, @Nullable Fn2<? super G,? super A,B> terminator, @NotNull Fn2<? super G,? super A,G> reducer)
This implementation should be correct, but could be slow in the case where previous operations are slow and the terminateWhen operation is fast and terminates early.
-