| Package | Description |
|---|---|
| org.organicdesign.fp.function |
Exception-friendly functional interfaces named by the number of arguments: Fn0, Fn1, Fn2....
|
| 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".
|
| Modifier and Type | Class and Description |
|---|---|
class |
LazyRef<T>
Lazily initialize a value (and free the initialization resources) on the first call to get().
|
| Modifier and Type | Method and Description |
|---|---|
static <T> LazyRef<T> |
LazyRef.of(Fn0<T> producer)
Construct a LazyRef from the given initialization function.
|
| Modifier and Type | Method and Description |
|---|---|
<R> R |
OneOf2OrNone.match(Fn1<A,R> fa,
Fn1<B,R> fb,
Fn0<R> fz)
Languages that have union types built in have a match statement that works like this method.
|
<U> U |
Option.match(Fn1<T,U> has,
Fn0<U> hasNot)
Pass in a function to execute if its Some and another to execute if its None.
|
<U> U |
Option.Some.match(Fn1<T,U> has,
Fn0<U> hasNot)
Pass in a function to execute if its Some and another to execute if its None.
|
<U> U |
None.match(Fn1<T,U> has,
Fn0<U> hasNot)
Pass in a function to execute if its Some and another to execute if its None.
|
Copyright © 2019. All rights reserved.