| 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 |
|---|---|
Option<UnmodMap.UnEntry<K,V>> |
ImSortedMap.entry(K key) |
Option<UnmodMap.UnEntry<K,V>> |
PersistentTreeMap.entry(K key)
Returns an Option of the key/value pair matching the given key, or Option.none() if the key is
not found.
|
Option<UnmodMap.UnEntry<K,V>> |
PersistentHashMap.entry(K key) |
Option<UnmodMap.UnEntry<K,V>> |
PersistentHashMap.MutableHashMap.entry(K key) |
Option<UnmodMap.UnEntry<K,V>> |
BaseMap.entry(K key)
Returns an option of the key/value pair associated with this key
|
default Option<T> |
UnmodIterable.head()
The first item in this iterable.
|
Option<UnmodMap.UnEntry<K,V>> |
PersistentTreeMap.head()
The first item in this iterable.
|
Option<E> |
PersistentTreeSet.head()
The first item in this iterable.
|
default Option<E> |
BaseList.head()
The first item in this iterable.
|
| Modifier and Type | Class and Description |
|---|---|
class |
None<T>
Represents the absence of a value
|
static class |
Option.Some<T>
Represents the presence of a value, even if that value is null.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> Option<T> |
Option.none()
Calling this instead of referring to NONE directly can make the type infrencer happy.
|
static <T> Option<T> |
Option.of(T t)
Deprecated.
|
static <T> Option<T> |
Option.some(T t)
Public static factory method for constructing the Some Option.
|
static <T> Option<T> |
Option.someOrNullNoneOf(T t)
Construct an option, but if t is null, make it None instead of Some.
|
<U> Option<U> |
Option.then(Fn1<T,Option<U>> f)
If this is Some, Apply the given function, else return None.
|
<U> Option<U> |
Option.Some.then(Fn1<T,Option<U>> f)
If this is Some, Apply the given function, else return None.
|
<U> Option<U> |
None.then(Fn1<T,Option<U>> f)
If this is Some, Apply the given function, else return None.
|
| Modifier and Type | Method and Description |
|---|---|
<U> Option<U> |
Option.then(Fn1<T,Option<U>> f)
If this is Some, Apply the given function, else return None.
|
<U> Option<U> |
Option.Some.then(Fn1<T,Option<U>> f)
If this is Some, Apply the given function, else return None.
|
<U> Option<U> |
None.then(Fn1<T,Option<U>> f)
If this is Some, Apply the given function, else return None.
|
| Modifier and Type | Method and Description |
|---|---|
default Option<T> |
Transformable.head()
Returns the first item produced by this transform.
|
Copyright © 2019. All rights reserved.