Uses of Class
org.javimmutable.collections.Maybe
Package
Description
-
Uses of Maybe in org.javimmutable.collections
Modifier and TypeMethodDescriptionInvokes absentAction if this is empty.Invokes presentAction with this value if this is full.Maybe.applyThrows
(Proc0Throws<E> absentAction) Invokes absentAction if this is empty.Maybe.applyThrows
(Proc1Throws<? super T, E> presentAction) Invokes presentAction with this value if this is full.static <T> Maybe
<T> Determine if the object is an instance of the specified Class or a subclass.static <T> Maybe
<T> Maybe.empty()
Returns aMaybe
with no value.IArray.find
(int index) Return a Holder containing the value associated wth the index or an empty Holder if no value is associated with the index.Search for a value within the map and return a Holder indicating if the value was found and, if it was found, the value itself.Indexed.find
(int index) Retrieves a Holder containing the (possibly null) value at the specified index if it exists.Returns a Holder containing the specified key if its contained in the set.Return a Holder containing the value associated wth the key or an empty Holder if no value is associated with the key.IArray.findEntry
(int index) Search for an Entry within the map and return a Holder indicating if the Entry was found and, if it was found, the Entry itself.Search for an Entry within the map and return a Holder indicating if the Entry was found and, if it was found, the Entry itself.static <T> Maybe
<T> Returns aMaybe
containing the first value of the collection.static <T> Maybe
<T> Returns aMaybe
containing the first value of the collection for which the predicate returns true.abstract <A> Maybe
<A> Produce aMaybe
based on this one.Produce aMaybe
based on this one.abstract <A> Maybe
<A> Produce aMaybe
based on this one.Maybe.flatMapThrows
(Func0Throws<Maybe<A>, E> absentMapping, Func1Throws<? super T, Maybe<A>, E> presentMapping) Produce aMaybe
based on this one.Maybe.flatMapThrows
(Func0Throws<Maybe<T>, E> absentMapping) Produce aMaybe
based on this one.Maybe.flatMapThrows
(Func1Throws<? super T, Maybe<A>, E> presentMapping) Produce aMaybe
based on this one.Produce a fullMaybe
.abstract <U> Maybe
<U> Produce a fullMaybe
.abstract <U> Maybe
<U> Produce aMaybe
that is empty if this is empty or else contains the result of passing this value to the given mapping function.Maybe.mapThrows
(Func0Throws<? extends T, E> absentMapping) Produce a fullMaybe
.Maybe.mapThrows
(Func0Throws<? extends U, E> absentMapping, Func1Throws<? super T, ? extends U, E> presentMapping) Produce a fullMaybe
.Maybe.mapThrows
(Func1Throws<? super T, ? extends U, E> presentMapping) Produce aMaybe
that is empty if this is empty or else contains the result of passing this value to the given mapping function.NotNull.maybe()
Maybe.nullToEmpty()
If this empty or has a null value returnsempty()
, otherwise returns this.static <T> Maybe
<T> Maybe.of
(T valueOrNull) Returns aMaybe
containing the value.Returns this if this is full and predicate returns false.Returns this if this is full and predicate returns true.IDeque.single()
Returns a Holder containing a value if this list contains only a single value and that value is non-null.Modifier and TypeMethodDescriptionabstract <A> Maybe
<A> Produce aMaybe
based on this one.abstract <A> Maybe
<A> Produce aMaybe
based on this one.Produce aMaybe
based on this one.abstract <A> Maybe
<A> Produce aMaybe
based on this one.Maybe.flatMapThrows
(Func0Throws<Maybe<A>, E> absentMapping, Func1Throws<? super T, Maybe<A>, E> presentMapping) Produce aMaybe
based on this one.Maybe.flatMapThrows
(Func0Throws<Maybe<A>, E> absentMapping, Func1Throws<? super T, Maybe<A>, E> presentMapping) Produce aMaybe
based on this one.Maybe.flatMapThrows
(Func0Throws<Maybe<T>, E> absentMapping) Produce aMaybe
based on this one.Maybe.flatMapThrows
(Func1Throws<? super T, Maybe<A>, E> presentMapping) Produce aMaybe
based on this one.<A> IDeque
<A> IDeque.transformSome
(Func1<T, Maybe<A>> transform) Apply the transform function to all elements in iterator order and add the contents of non-empty Holders to a new collection of this type.<A> IList
<A> IList.transformSome
(Func1<T, Maybe<A>> transform) Apply the transform function to all elements in iterator order and add the contents of non-empty Holders to a new collection of this type.Update the value at the key. -
Uses of Maybe in org.javimmutable.collections.array
Modifier and TypeMethodDescriptionTrieArray.find
(int index) TrieArrayNode.find
(int index) TrieArray.findEntry
(int index) ArrayGetMapper.mappedFind
(T mapping, K key) <K,
V> Maybe <V> TrieArrayNode.mappedFind
(ArrayGetMapper<K, V, T> mapper, K key) ArrayFindEntryMapper.mappedFindEntry
(T mapping, K key) TrieArrayNode.mappedFindEntry
(ArrayFindEntryMapper<K, V, T> mapper, K key) Modifier and TypeMethodDescription<K,
V> TrieArrayNode <T> TrieArrayNode.mappedUpdate
(ArrayUpdateMapper<K, V, T> mapper, K key, Func1<Maybe<V>, V> generator) -
Uses of Maybe in org.javimmutable.collections.common
Modifier and TypeMethodDescriptionSubindexed.find
(int index) CollisionMap.findEntry
(CollisionMap.Node node, K key) CollisionMap.findValue
(CollisionMap.Node node, K key) Modifier and TypeMethodDescription -
Uses of Maybe in org.javimmutable.collections.deque
Modifier and TypeMethodDescription<A> ArrayDeque
<A> ArrayDeque.transformSome
(Func1<T, Maybe<A>> transform) -
Uses of Maybe in org.javimmutable.collections.hash
Modifier and TypeMethodDescriptionHashMap.mappedFind
(ArrayMapNode<K, V> mapping, K key) HashMap.mappedFindEntry
(ArrayMapNode<K, V> mapping, K key) -
Uses of Maybe in org.javimmutable.collections.hash.map
Modifier and TypeMethodDescriptionArrayMapNode.find
(CollisionMap<K, V> collisionMap, K key) ArrayMultiValueMapNode.find
(CollisionMap<K, V> collisionMap, K key) ArraySingleValueMapNode.find
(CollisionMap<K, V> collisionMap, K key) ArrayMapNode.findEntry
(CollisionMap<K, V> collisionMap, K key) ArrayMultiValueMapNode.findEntry
(CollisionMap<K, V> collisionMap, K key) ArraySingleValueMapNode.findEntry
(CollisionMap<K, V> collisionMap, K key) Modifier and TypeMethodDescription -
Uses of Maybe in org.javimmutable.collections.indexed
-
Uses of Maybe in org.javimmutable.collections.inorder
-
Uses of Maybe in org.javimmutable.collections.list
Modifier and TypeMethodDescriptionTreeList.find
(int index) ListCollisionMap.findEntry
(CollisionMap.Node node, K key) ListCollisionMap.findValue
(CollisionMap.Node node, K key) Modifier and TypeMethodDescription<A> TreeList
<A> TreeList.transformSome
(Func1<T, Maybe<A>> transform) -
Uses of Maybe in org.javimmutable.collections.serialization
-
Uses of Maybe in org.javimmutable.collections.tree
Modifier and TypeMethodDescriptionTreeCollisionMap.findEntry
(CollisionMap.Node node, K key) TreeCollisionMap.findValue
(CollisionMap.Node node, K key) -
Uses of Maybe in org.javimmutable.collections.util