| 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).
|
| Modifier and Type | Method and Description |
|---|---|
default <G,B> Or<G,B> |
UnmodIterable.foldUntil(G accum,
Fn2<? super G,? super T,B> terminator,
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().
|
| Modifier and Type | Class and 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).
|
| Modifier and Type | Method and Description |
|---|---|
static <G,B> Or<G,B> |
Or.bad(B bad)
Construct a new Bad from the given object.
|
static <G,B> Or<G,B> |
Or.good(G good)
Construct a new Good from the given object.
|
| Modifier and Type | Method and Description |
|---|---|
<G,B> Or<G,B> |
Xform.foldUntil(G accum,
Fn2<? super G,? super A,B> terminator,
Fn2<? super G,? super A,G> reducer)
Thit 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.
|
<G,B> Or<G,B> |
Transformable.foldUntil(G accum,
Fn2<? super G,? super T,B> terminator,
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().
|
Copyright © 2019. All rights reserved.