| Package | Description |
|---|---|
| org.organicdesign.fp |
A data definition language, and other tools for writing functional Java.
|
| org.organicdesign.fp.collections |
Type-safe versions of the immutable Clojure collections, plus unmodifiable and immutable
collection interfaces that extend the java.util collections, deprecating the mutate-in-place
methods (Unmod____) and adding methods that return a new, immutable, modified version of the
collection (Im____).
|
| Modifier and Type | Class and Description |
|---|---|
static class |
Option.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 | Field and Description |
|---|---|
static Option |
Option.NONE
None is a singleton and this is its only instance.
|
| 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)
Public static factory method for contructing Options.
|
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(Function1<T,Option<U>> f)
If this is Some, Apply the given function, else return None.
|
<U> Option<U> |
Option.None.then(Function1<T,Option<U>> f)
If this is Some, Apply the given function, else return None.
|
<U> Option<U> |
Option.Some.then(Function1<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(Function1<T,Option<U>> f)
If this is Some, Apply the given function, else return None.
|
<U> Option<U> |
Option.None.then(Function1<T,Option<U>> f)
If this is Some, Apply the given function, else return None.
|
<U> Option<U> |
Option.Some.then(Function1<T,Option<U>> f)
If this is Some, Apply the given function, else return None.
|
| 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>> |
ImMap.entry(K key) |
Option<E> |
PersistentTreeSet.head()
The first item in this sequence.
|
default Option<T> |
UnmodIterable.head()
The first item in this sequence.
|
Option<UnmodMap.UnEntry<K,V>> |
PersistentTreeMap.head()
The first item in this sequence.
|
Copyright © 2017. All rights reserved.