Index
All Classes and Interfaces|All Packages|Serialized Form
A
- accept(D) - Method in interface sprouts.Action
-
Executes the action.
Note that this method deliberately requires the handling of checked exceptions at its invocation sites because there may be any number of implementations hiding behind this interface, and so when you invoke this method it is unwise to assume that your control flow will not be interrupted by exceptions. - across(Class<B>, Function<A, B>, BiFunction<A, B, A>) - Static method in interface sprouts.Lens
-
Creates a lens that operates across all elements of a
Tuple
, allowing bulk transformations of homogeneous data structures. - Action<D> - Interface in sprouts
-
A functional interface for observing state changes and performing some action in response.
- add(E) - Method in interface sprouts.ValueSet
-
Returns a new value set with the supplied element added to it, or this value set if the element is already present in this value set.
- add(Val<T>) - Method in interface sprouts.Vars
- add(Var<T>) - Method in interface sprouts.Vars
-
Adds the provided property to the end of the list.
- add(T) - Method in interface sprouts.Tuple
-
Creates a new tuple of items where the supplied item is appended to the end of the tuple.
- add(T) - Method in interface sprouts.Vars
-
Wraps the provided value in a
Var
property and adds it to the list. - ADD - Enum constant in enum class sprouts.SequenceChange
-
Indicates that a new value was added to the
Vars
instance. - addAll(E...) - Method in interface sprouts.ValueSet
-
Returns a new value set with all the elements from the supplied array of elements added to it.
- addAll(Iterable<? extends E>) - Method in interface sprouts.ValueSet
-
Returns a new value set with all the elements from the supplied
Iterable
added to it. - addAll(Iterable<T>) - Method in interface sprouts.Tuple
-
Creates and returns a new tuple from this one where the items of the supplied
Iterable
are appended at the end of the new item sequence. - addAll(Iterable<T>) - Method in interface sprouts.Vars
-
Iterates over the supplied values, and appends them to
this
list as properties. - addAll(Collection<? extends E>) - Method in interface sprouts.ValueSet
-
Returns a new value set with all the elements from the supplied
Collection
added to it. - addAll(Set<? extends E>) - Method in interface sprouts.ValueSet
-
Returns a new value set with all the elements from the supplied
Set
of elements added to it. - addAll(Stream<? extends E>) - Method in interface sprouts.ValueSet
-
Returns a new value set with all the elements from the supplied
Stream
added to it. - addAll(Stream<T>) - Method in interface sprouts.Vars
-
Iterates over the supplied stream of values, and appends them to
this
list as properties. - addAll(Tuple<E>) - Method in interface sprouts.ValueSet
-
Returns a new value set with all the elements from the supplied
Tuple
of elements added to it. - addAll(Tuple<T>) - Method in interface sprouts.Tuple
-
Creates a merged tuple of items where the first sequence is based on the items of this tuple and the second sequence is based on the items of the provided tuple.
- addAll(Vals<T>) - Method in interface sprouts.Vars
-
Iterates over the supplied properties, and adds their items to this list in the form of new property instances.
- addAll(ValueSet<? extends E>) - Method in interface sprouts.ValueSet
-
Returns a new value set with all the elements from the supplied value set added to this one.
- addAll(Vars<T>) - Method in interface sprouts.Vars
-
Adds all properties from the provided list of properties to
this
list. - addAll(T...) - Method in interface sprouts.Tuple
-
Wraps each provided item in a property and appends it to this tuple of items.
- addAll(T...) - Method in interface sprouts.Vars
-
Wraps each provided item in a property and appends it to this list of properties.
- addAllAt(int, Iterable<T>) - Method in interface sprouts.Tuple
-
Iterates over the supplied values, and adds them to
this
tuple as items at the specified index. - addAllAt(int, Iterable<T>) - Method in interface sprouts.Vars
-
Iterates over the supplied values, and adds them to
this
list as properties at the specified index. - addAllAt(int, Stream<T>) - Method in interface sprouts.Vars
-
Iterates over the supplied stream of values, and adds them to
this
list as properties at the specified index. - addAllAt(int, Tuple<T>) - Method in class sprouts.impl.TupleTree
- addAllAt(int, Tuple<T>) - Method in class sprouts.impl.TupleWithDiff
- addAllAt(int, Tuple<T>) - Method in interface sprouts.Tuple
-
Adds all items from the provided tuple of items to
this
tuple at a specified index. - addAllAt(int, Vals<T>) - Method in interface sprouts.Vars
-
Iterates over the supplied properties, and adds their items to this list in the form of new property instances at the specified index.
- addAllAt(int, Vars<T>) - Method in interface sprouts.Vars
-
Adds all properties from the provided list of properties to
this
list at a specified index. - addAllAt(int, T...) - Method in interface sprouts.Tuple
-
Wraps each provided item in a property and adds them to this tuple of items at the specified index.
- addAllAt(int, T...) - Method in interface sprouts.Vars
-
Wraps each provided item in a property and adds them to this list of properties at the specified index.
- addAt(int, Val<T>) - Method in interface sprouts.Vars
- addAt(int, Var<T>) - Method in interface sprouts.Vars
-
Adds the provided property to the list at the specified index.
- addAt(int, T) - Method in class sprouts.impl.TupleTree
- addAt(int, T) - Method in class sprouts.impl.TupleWithDiff
- addAt(int, T) - Method in interface sprouts.Tuple
-
Creates an updated tuple of items where the supplied item is inserted at the specified index.
- addAt(int, T) - Method in interface sprouts.Vars
-
Wraps the provided value in a
Var
property and adds it to the list at the specified index. - addIfNonNull(T) - Method in interface sprouts.Tuple
-
Adds the supplied item to the new tuple, if and only if the item is not null.
- addIfNonNullAt(int, T) - Method in interface sprouts.Tuple
-
Creates a new tuple of items where the supplied item is inserted at the specified index if, and only if, the item is not null.
- all(Predicate<E>) - Method in interface sprouts.ValueSet
-
Applies the supplied predicate lambda to all elements in this value set and returns
true
if all of them match the predicate, otherwisefalse
. - all(Predicate<Pair<K, V>>) - Method in interface sprouts.Association
-
Checks if all the key-value pairs in this association match the given predicate and returns
true
if all of them do, otherwisefalse
. - all(Predicate<Val<T>>) - Method in interface sprouts.Vals
-
Check if all the properties in this list match the given predicate.
- all(Predicate<T>) - Method in interface sprouts.Tuple
-
Check if all the items in this tuple match the given predicate.
- ALL - Enum constant in enum class sprouts.From
-
This channel is used to identify changes which are caused by any source.
- allowsNull() - Method in class sprouts.impl.TupleTree
- allowsNull() - Method in class sprouts.impl.TupleWithDiff
- allowsNull() - Method in interface sprouts.Tuple
-
A tuple will only allow nullable items if it was constructed with a "ofNullable(..)" factory method.
- allowsNull() - Method in interface sprouts.Val
-
A property will only allow null items if it was constructed with a "ofNullable(..)" factory method.
- allowsNull() - Method in interface sprouts.Vals
-
A property list will only allow nullable properties if it was constructed with a "ofNullable(..)" factory method.
- andThen(Action<D>) - Method in interface sprouts.Action
-
Returns a new
Action
that will execute this action and then the given action. - andThen(Observer) - Method in interface sprouts.Observer
-
Returns a new
Observer
that will execute this callback and then the given callback. - any(Predicate<E>) - Method in interface sprouts.ValueSet
-
Applies the supplied predicate lambda to all elements in this value set and returns
true
if any of them match the predicate, otherwisefalse
. - any(Predicate<Pair<K, V>>) - Method in interface sprouts.Association
-
Checks if any of the key-value pairs in this association match the given predicate and returns
true
if any of them do, otherwisefalse
. - any(Predicate<Val<T>>) - Method in interface sprouts.Vals
-
Check if any of the properties in this list match the given predicate.
- any(Predicate<T>) - Method in interface sprouts.Tuple
-
Check if any of the items in this tuple match the given predicate.
- anyEmpty() - Method in interface sprouts.Vals
-
Check if any of the properties in this list is empty.
- anyNull() - Method in interface sprouts.Tuple
-
Check if any of the items in this tuple is null.
- Association<K,
V> - Interface in sprouts -
Defines an association between keys and values as an immutable value object where the values are accessed by the keys in a map-like fashion.
- associationOf(Class<K>, Class<V>) - Method in class sprouts.impl.Sprouts
- associationOf(Class<K>, Class<V>) - Method in interface sprouts.impl.SproutsFactory
- associationOfLinked(Class<K>, Class<V>) - Method in class sprouts.impl.Sprouts
- associationOfLinked(Class<K>, Class<V>) - Method in interface sprouts.impl.SproutsFactory
- associationOfSorted(Class<K>, Class<V>) - Method in class sprouts.impl.Sprouts
- associationOfSorted(Class<K>, Class<V>) - Method in interface sprouts.impl.SproutsFactory
- associationOfSorted(Class<K>, Class<V>, Comparator<K>) - Method in class sprouts.impl.Sprouts
- associationOfSorted(Class<K>, Class<V>, Comparator<K>) - Method in interface sprouts.impl.SproutsFactory
- at(int) - Method in interface sprouts.Vals
-
The property at the given index.
- at(int) - Method in interface sprouts.Vars
-
The property at the given index.
B
- between(Class<K>, Class<V>) - Static method in interface sprouts.Association
-
Creates a new association between keys and values with the given key and value types.
- betweenLinked(Class<K>, Class<V>) - Static method in interface sprouts.Association
-
Creates a new linked association between keys and values with the given key and value types, where the order of key-value pairs in this type of association is based on the order in which the pairs are added to the association.
- betweenSorted(Class<K>, Class<V>) - Static method in interface sprouts.Association
-
Creates a new association between keys and values with the given key and value types, where the keys are sorted in natural order.
- betweenSorted(Class<K>, Class<V>, Comparator<K>) - Static method in interface sprouts.Association
-
Creates a new association between keys and values with the given key and value types, where the key-value pairs are sorted using the supplied comparator.
C
- cast(Event) - Static method in interface sprouts.Observable
-
Casts the given
Event
to anObservable
. - cast(Val<T>) - Static method in interface sprouts.Viewable
- cast(Vals<T>) - Static method in interface sprouts.Viewables
- change() - Method in class sprouts.impl.SequenceDiff
-
The type of change that occurred between the previous and current
Tuple
state (to which thisSequenceDiff
belongs). - change() - Method in interface sprouts.ValDelegate
-
The type of change that occurred in the property.
- change() - Method in interface sprouts.ValsDelegate
-
The type of change that occurred in the property list.
- channel() - Method in interface sprouts.ValDelegate
-
The
Channel
constant from which the change originated. - Channel - Interface in sprouts
-
This is a marker interface for property event channels.
- classTyped(Class<E>) - Static method in interface sprouts.ValueSet
-
An alternative to
ValueSet.class
which also includes the parameter type in the type signature of the returnedValueSet
class. - classTyped(Class<F>, Class<S>) - Static method in class sprouts.Pair
-
An alternative to
Pair.class
which also includes the parameter types in the type signature of the returned pair class. - classTyped(Class<K>, Class<V>) - Static method in interface sprouts.Association
-
An alternative to
Association.class
which also includes the parameter types in the type signature of the returned association class. - classTyped(Class<T>) - Static method in interface sprouts.Tuple
-
An alternative to
Tuple.class
which also includes the parameter type in the type signature of the returned tuple class. - clear() - Method in interface sprouts.Association
-
Returns a completely empty association but with the same key and value types as this one.
- clear() - Method in class sprouts.impl.TupleTree
- clear() - Method in class sprouts.impl.TupleWithDiff
- clear() - Method in interface sprouts.Tuple
-
Creates a new tuple of this one without any items but the same nullability (see
Tuple.allowsNull()
). - clear() - Method in interface sprouts.ValueSet
-
Returns a completely empty value set but with the same element type as this one.
- clear() - Method in interface sprouts.Vars
-
Removes all properties from
this
list. - CLEAR - Enum constant in enum class sprouts.SequenceChange
-
Indicates that the
Vars
instance was cleared. - collectorOf(Class<E>) - Static method in interface sprouts.ValueSet
-
A collector that can be used to collect elements from a Java
Stream
into a value set. - collectorOf(Class<K>, Class<V>) - Static method in interface sprouts.Association
- collectorOf(Class<T>) - Static method in interface sprouts.Tuple
-
Creates a
Collector
that can be used to collect a stream of items into a new tuple of non-nullable items. - collectorOfLinked(Class<E>) - Static method in interface sprouts.ValueSet
-
A collector that can be used to collect elements from a Java
Stream
into a linked value set with an order, which is defined by the insertion order of the elements. - collectorOfLinked(Class<K>, Class<V>) - Static method in interface sprouts.Association
-
A collector that can be used to collect key-value pairs from a Java
Stream
ofPair
instances into an association with the given key and value types, where the key-value pairs are always ordered in the order they are added to the association.
The types of the keys and values in the association have to be defined when using this collector.
Here is an example demonstrating how this method may be used: - collectorOfNullable(Class<T>) - Static method in interface sprouts.Tuple
-
Use this to collect a stream of items into a new tuple of nullable items.
- collectorOfSorted(Class<E>) - Static method in interface sprouts.ValueSet
-
A collector that can be used to collect elements from a Java
Stream
into a value set with the order being based on theComparable
implementation of the elements and the natural ordering of the elements.
The types of the elements and values in the value set have to be defined when using this collector.
Here is an example demonstrating how this method may be used: - collectorOfSorted(Class<E>, Comparator<E>) - Static method in interface sprouts.ValueSet
-
A collector that can be used to collect elements from a Java
Stream
into a value set with an explicit order defined by the supplied comparator. - collectorOfSorted(Class<K>, Class<V>, Comparator<K>) - Static method in interface sprouts.Association
- Composability: - Search tag in interface sprouts.Lens
- Section
- contains(T) - Method in interface sprouts.Tuple
-
Checks weather the supplied item is in this tuple of items.
- contains(T) - Method in interface sprouts.Vals
-
Checks weather the supplied item is in this list of properties.
- contains(E) - Method in interface sprouts.ValueSet
-
Checks if the supplied element is present in this value set and returns
true
if it is, otherwisefalse
. - contains(Val<T>) - Method in interface sprouts.Vals
-
Check if the value of the supplied property is wrapped by any of the properties in this list.
- containsAll(E...) - Method in interface sprouts.ValueSet
-
Checks if all the elements in the given array are present in this value set and returns
true
if they are, otherwisefalse
. - containsAll(Iterable<? extends E>) - Method in interface sprouts.ValueSet
-
Checks if all the elements in the supplied
Iterable
are present in this value set and returnstrue
if they are, otherwisefalse
. - containsAll(Collection<? extends E>) - Method in interface sprouts.ValueSet
-
Checks if all the elements in the supplied
Collection
are present in this value set and returnstrue
if they are, otherwisefalse
. - containsAll(Set<? extends E>) - Method in interface sprouts.ValueSet
-
Checks if all the elements in the given set are present in this value set and returns
true
if they are, otherwisefalse
. - containsAll(Stream<? extends E>) - Method in interface sprouts.ValueSet
-
Checks if all the elements in the supplied
Stream
are present in this value set and returnstrue
if they are, otherwisefalse
. - containsAll(Tuple<? extends E>) - Method in interface sprouts.ValueSet
-
Checks if all the elements in the supplied
Tuple
are present in this value set and returnstrue
if they are, otherwisefalse
. - containsAll(ValueSet<? extends E>) - Method in interface sprouts.ValueSet
-
Checks if all the elements in the supplied value set are present in this value set and returns
true
if they are, otherwisefalse
. - containsKey(K) - Method in interface sprouts.Association
-
Checks if the given key is present in this association and returns
true
if it is, otherwisefalse
. - create() - Static method in interface sprouts.Event
-
Creates a new empty
Event
that can be observed and triggered. - create() - Static method in class sprouts.Version
-
Creates a unique version object with a new lineage and a succession number of zero.
- currentValue() - Method in interface sprouts.ValDelegate
-
Exposes the value of the property that was listened to in an
Maybe
wrapper. - currentValues() - Method in interface sprouts.ValsDelegate
-
Exposes a read only property list after the change has been applied.
D
- defaultChannel() - Method in class sprouts.impl.Sprouts
- defaultChannel() - Method in interface sprouts.impl.SproutsFactory
-
The default channel used for change events.
- defaultId() - Method in class sprouts.impl.Sprouts
- defaultId() - Method in interface sprouts.impl.SproutsFactory
-
The default id for properties which do not have an id explicitly specified.
- defaultObservableChannel() - Method in class sprouts.impl.Sprouts
- defaultObservableChannel() - Method in interface sprouts.impl.SproutsFactory
-
The default channel used for
Observable
events, registered through theObservable.subscribe(Observer)
method. - delegateOf(Val<T>, Channel, SingleChange, T, T) - Method in class sprouts.impl.Sprouts
- delegateOf(Val<T>, Channel, SingleChange, T, T) - Method in interface sprouts.impl.SproutsFactory
- delegateOf(Vals<T>, SequenceChange, int, Vals<T>, Vals<T>) - Method in class sprouts.impl.Sprouts
- delegateOf(Vals<T>, SequenceChange, int, Vals<T>, Vals<T>) - Method in interface sprouts.impl.SproutsFactory
- description() - Method in class sprouts.Problem
-
A problem may have a description, which provides more detailed information about what went wrong.
- Design Overview - Search tag in class sprouts.impl.TupleTree
- Section
- differenceFromPrevious() - Method in interface sprouts.impl.SequenceDiffOwner
-
Provides a
SequenceDiff
object that describes the difference between the current tuple and a previous one (if any), in terms of aSequenceChange
, the index of the change, and the number of changes. - differenceFromPrevious() - Method in class sprouts.impl.TupleWithDiff
- DISTINCT - Enum constant in enum class sprouts.SequenceChange
-
Indicates that the duplicates in the
Vars
instance were removed.
E
- entrySet() - Method in interface sprouts.Association
- equals(Object, Object) - Static method in interface sprouts.Val
-
Val
andVar
implementations are expected to represent simple wrappers for data centric quasi value types! So two primitive arrays of integers for example would not be recognized as equal when calling one of theirObject.equals(Object)
methods because the method does not compare the contents of the two arrays, it compares the identities of the arrays! This method defines what it means for 2 property items to be equal. - equals(Object) - Method in class sprouts.impl.SequenceDiff
- equals(Object) - Method in class sprouts.impl.TupleTree
- equals(Object) - Method in class sprouts.impl.TupleWithDiff
- equals(Object) - Method in class sprouts.Pair
- equals(Object) - Method in class sprouts.Problem
- equals(Object) - Method in class sprouts.Result
- equals(Object) - Method in interface sprouts.ValueSet
-
Compares the specified object with this set for equality.
- equals(Object) - Method in class sprouts.Version
- event() - Method in class sprouts.impl.Sprouts
- event() - Method in interface sprouts.impl.SproutsFactory
- Event - Interface in sprouts
-
An event is something that can be triggered and reacted through
Observable
s created by theEvent.observable()
method. - Event.Executor - Interface in sprouts
- eventOf(Event.Executor) - Method in class sprouts.impl.Sprouts
- eventOf(Event.Executor) - Method in interface sprouts.impl.SproutsFactory
- exception() - Method in class sprouts.Problem
-
A problem object may or may not have an exception attached to it.
- execute(Runnable) - Method in interface sprouts.Event.Executor
-
Executes the given
Runnable
.
F
- factory() - Static method in class sprouts.impl.Sprouts
-
A
SproutsFactory
is used by the various factory methods of this API likeVar.of(Object)
,Vals.of(Object, Object[])
... - Factory Method: - Search tag in interface sprouts.Lens
- Section
- fire() - Method in interface sprouts.Event
-
Triggers this
Event
, which means that all registered listeners will be notified. - fireChange() - Method in interface sprouts.Vals
-
Similar to
Val.fireChange(Channel)
but for a list of properties. - fireChange(Channel) - Method in interface sprouts.Val
-
Triggers all observer lambdas for the given
Channel
. - fireChange(SequenceChange, int, Vals<T>, Vals<T>, Vals<T>) - Method in class sprouts.impl.PropertyListChangeListeners
-
Fires a change event with the given type of
SequenceChange
, index, new values, old values and source. - fireChange(SequenceChange, int, Var<T>, Var<T>, Vals<T>) - Method in class sprouts.impl.PropertyListChangeListeners
-
Fires a change event with the given type of
SequenceChange
, index, new value, old value and source. - fireChange(SequenceChange, Vals<T>) - Method in class sprouts.impl.PropertyListChangeListeners
-
Fires a change event with the given type of
SequenceChange
and the source of the change. - fireChange(Val<T>, Channel, T, T) - Method in class sprouts.impl.PropertyChangeListeners
-
Fires a change event for the given property and channel.
- first() - Method in class sprouts.Pair
-
Returns the first value of this pair, which corresponds to the first parameter of the
Pair.of(Object, Object)
factory method that created this pair. - first() - Method in interface sprouts.Tuple
-
Exposes the first item in the tuple of items.
- first() - Method in interface sprouts.Vals
-
Exposes the first property in the list of properties.
- first() - Method in interface sprouts.Vars
-
Exposes the first property in the list of properties.
- firstIndexOf(T) - Method in interface sprouts.Tuple
-
Use this to find the first index of an item in the tuple sequence.
- firstIndexOf(T) - Method in interface sprouts.Vals
-
Use this to find the index of an item.
- firstIndexOf(Maybe<T>) - Method in interface sprouts.Tuple
-
Uses the item of the supplied
Maybe
to find the index of the item in this tuple of items. - firstIndexOf(Val<T>) - Method in interface sprouts.Vals
-
Uses the item of the supplied property to find the index of the item in this list of properties.
- firstIndexStartingFrom(int, T) - Method in interface sprouts.Tuple
-
Use this to find the index of an item after a certain index.
- FORK_JOIN_POOL - Static variable in interface sprouts.Event.Executor
-
A
Event.Executor
that executes the givenRunnable
on theForkJoinPool.commonPool()
(which is a shared, static pool). - From - Enum Class in sprouts
G
- get() - Method in interface sprouts.ResultItemSupplier
-
Returns the item of the result or throws
Exception
orRuntimeException
when invoked by theResult.ofTry(Class, ResultItemSupplier)
factory method. - get() - Method in interface sprouts.Val
-
This method is intended to be used for when you want to wrap non-nullable types.
- get(int) - Method in class sprouts.impl.TupleTree
- get(int) - Method in class sprouts.impl.TupleWithDiff
- get(int) - Method in interface sprouts.Tuple
-
Exposes the
Maybe
at the specified index. - get(K) - Method in interface sprouts.Association
- getter(A) - Method in interface sprouts.Lens
-
Extracts the field of type
B
from the parent typeA
and returns it or throws an exception if an error occurs while extracting the field.
H
- handle(Class<E>, Consumer<E>) - Method in class sprouts.Result
-
Allows you to handle a specific type of exception that is present in the problems associated with this result.
- handleAny(Consumer<Problem>) - Method in class sprouts.Result
- hashCode() - Method in class sprouts.impl.SequenceDiff
- hashCode() - Method in class sprouts.impl.TupleTree
- hashCode() - Method in class sprouts.impl.TupleWithDiff
- hashCode() - Method in class sprouts.Pair
- hashCode() - Method in class sprouts.Problem
- hashCode() - Method in class sprouts.Result
- hashCode() - Method in interface sprouts.ValueSet
-
Returns the hash code value for this set.
- hashCode() - Method in class sprouts.Version
- hashCode(Object) - Static method in interface sprouts.Val
-
Val
andVar
implementations require their ownObject.hashCode()
method because they are supposed to be viewed as data centric quasi value types! So two arrays of integer for example would not have the same hash code when callingObject.hashCode()
on them. - hasID() - Method in interface sprouts.Val
-
A convenient method to check if this property has been assigned an id.
- HasId<I> - Interface in sprouts
-
This is a sort of marker interface for
Var
/Val
property item types, which tells the property that it wants to use the object returned by theHasId.id()
method as a unique identifier for its item when determining theValDelegate.change()
type. - hasNoID() - Method in interface sprouts.Val
-
A convenient method to check if this property has not been assigned an id.
- hasProblems() - Method in class sprouts.Result
-
Checks if this result has
Problem
s associated with it.
I
- id() - Method in interface sprouts.HasId
-
The unique identifier for this value object.
- id() - Method in interface sprouts.Val
-
Returns the name/id of the property which is useful for debugging as well as persisting their state by using them as keys for whatever storage data structure one chooses.
- id() - Method in interface sprouts.ValDelegate
-
Exposes the id of the property that was listened to.
- ID - Enum constant in enum class sprouts.SingleChange
-
The item implements
HasId
and changed itsHasId.id()
. - idPattern() - Method in class sprouts.impl.Sprouts
- idPattern() - Method in interface sprouts.impl.SproutsFactory
-
The regex
Pattern
used to validate property ids. - ifMissingLogAsDebug() - Method in class sprouts.Result
-
If this
Result
wraps a non-null item of typeV
, then this method will do nothing. - ifMissingLogAsError() - Method in class sprouts.Result
-
If this
Result
wraps a non-null item of typeV
, then this method will do nothing. - ifMissingLogAsInfo() - Method in class sprouts.Result
-
If this
Result
wraps a non-null item of typeV
, then this method will do nothing. - ifMissingLogAsTrace() - Method in class sprouts.Result
-
If this
Result
wraps a non-null item of typeV
, then this method will do nothing. - ifMissingLogAsWarning() - Method in class sprouts.Result
-
If this
Result
wraps a non-null item of typeV
, then this method will do nothing. - ifMissingLogTo(BiConsumer<String, Throwable>) - Method in class sprouts.Result
-
If this
Result
wraps a non-null item of typeV
, then this method will do nothing. - ifPresent(Consumer<T>) - Method in interface sprouts.Maybe
-
If an item is present, performs the given action with the item, otherwise does nothing.
- ifPresentOrElse(Consumer<? super T>, Runnable) - Method in interface sprouts.Maybe
-
If an item is present, performs the given action with the item, otherwise performs the given empty-based action.
- Implementation Notes - Search tag in class sprouts.impl.TupleTree
- Section
- index() - Method in class sprouts.impl.SequenceDiff
-
The index at which the change occurred in the
Tuple
. - index() - Method in interface sprouts.ValsDelegate
-
Exposes the index at which the
SequenceChange
on the property list took place.
Note that in case of the type of mutation be non-specific to a particular index, like a list clear or a list sort, this method will return an emptyOptional
. - indicesOf(T) - Method in interface sprouts.Tuple
-
Finds all indices of the given value in this tuple of items and returns them as an array of integers.
- indicesOf(T) - Method in interface sprouts.Vals
-
Finds all indices of the given value in this property list of items and returns them as an array of integers.
- initial() - Static method in class sprouts.impl.SequenceDiff
-
Creates a new
SequenceDiff
instance that represents the initial state of aTuple
instance. - invoke() - Method in interface sprouts.Observer
-
Executes this callback.
- is(T) - Method in interface sprouts.Maybe
-
This method checks if the provided item is equal to the item wrapped by this
Maybe
. - is(V) - Method in class sprouts.Result
-
This method checks if the provided item is equal to the item wrapped by this
Maybe
. - is(Maybe<T>) - Method in interface sprouts.Maybe
-
This method check if the item by the provided wrapper is equal to the item wrapped by this
Maybe
instance. - is(Maybe<V>) - Method in class sprouts.Result
-
This method check if the item by the provided wrapper is equal to the item wrapped by this
Maybe
instance. - is(Vals<T>) - Method in interface sprouts.Vals
-
Check for equality between this list of properties and another list of properties.
- isDirectPredecessorOf(Version) - Method in class sprouts.Version
-
Determines if this version object is a direct predecessor of another version object.
- isDirectSuccessorOf(SequenceDiff) - Method in class sprouts.impl.SequenceDiff
-
The successor of a
SequenceDiff
is computed deterministically from a previousSequenceDiff
. - isDirectSuccessorOf(Version) - Method in class sprouts.Version
-
Determines if this version object is a direct successor of another version object.
- isEmpty() - Method in interface sprouts.Association
-
Checks if this association is empty and returns
true
if it is, otherwisefalse
. - isEmpty() - Method in interface sprouts.Maybe
-
If an item is not present, returns
true
, otherwisefalse
. - isEmpty() - Method in interface sprouts.Tuple
-
The boolean flag that indicates if the tuple of items is empty, which means that it has no items.
- isEmpty() - Method in interface sprouts.Vals
-
The boolean flag that indicates if the list of properties is empty, which means that it has no properties.
- isEmpty() - Method in interface sprouts.ValueSet
-
Checks if this value set is empty and returns
true
if it is, otherwisefalse
. - isImmutable() - Method in interface sprouts.Val
-
This method is used to determine if the property is immutable or not.
- isLens() - Method in interface sprouts.Val
-
This method is used to determine if the property is a lens or not.
- isLinked() - Method in interface sprouts.Association
-
Checks if this association is linked and returns
true
if it is, otherwisefalse
. - isLinked() - Method in interface sprouts.ValueSet
-
Checks if this value set is a linked value set and returns
true
if it is, otherwisefalse
. - isMutable() - Method in interface sprouts.Val
-
This method is used to determine if the property is mutable or not.
- isMutable() - Method in interface sprouts.Vals
-
Tells you whether this list of properties is mutable or not.
- isNot(T) - Method in interface sprouts.Maybe
-
This method check if the provided item is not equal to the item wrapped by this
Maybe
instance. - isNot(Maybe<T>) - Method in interface sprouts.Maybe
-
This method check if the item of the provided wrapper is not equal to the item wrapped by this
Maybe
wrapper instance. - isNotEmpty() - Method in interface sprouts.Association
-
Checks if this association is not empty and returns
true
if it is not, otherwisefalse
. - isNotEmpty() - Method in interface sprouts.Tuple
-
The boolean flag that indicates if the tuple of items is not empty, which means that it has at least one
Maybe
. - isNotEmpty() - Method in interface sprouts.Vals
-
The boolean flag that indicates if the list of properties is not empty, which means that it has at least one property.
- isNotEmpty() - Method in interface sprouts.ValueSet
-
Checks if this value set is not empty and returns
true
if it is not, otherwisefalse
. - isOneOf(T, T, T...) - Method in interface sprouts.Maybe
-
This method checks if at least one of the provided items is equal to the item wrapped by this
Maybe
instance. - isOneOf(Maybe<T>, Maybe<T>, Maybe<T>...) - Method in interface sprouts.Maybe
-
This checks if at least one of the items of the provided properties is equal to the item wrapped by this
Maybe
instance. - isPredecessorOf(Version) - Method in class sprouts.Version
-
Determines if this version object is a predecessor of another version object.
- isPresent() - Method in interface sprouts.Maybe
-
If an item is present, returns
true
, otherwisefalse
. - isPresent() - Method in class sprouts.Result
-
If an item is present, returns
true
, otherwisefalse
. - isSorted() - Method in interface sprouts.Association
-
Checks if this association is sorted and returns
true
if it is, otherwisefalse
. - isSorted() - Method in interface sprouts.ValueSet
-
Checks if this value set is sorted and returns
true
if it is, otherwisefalse
. - isSuccessorOf(Version) - Method in class sprouts.Version
-
Determines if this version object is a successor of another version object.
- isView() - Method in interface sprouts.Val
-
This method is used to determine if the property is a view or not.
- isView() - Method in interface sprouts.Vals
-
Tells you whether this list of properties is a view or not.
- itemAsString() - Method in interface sprouts.Maybe
-
This method simply returns a
String
representation of the wrapped item which would otherwise be accessed via theMaybe.orElseThrow()
method. - iterator() - Method in class sprouts.impl.TupleTree
- iterator() - Method in class sprouts.impl.TupleWithDiff
- iterator() - Method in interface sprouts.Tuple
K
- keySet() - Method in interface sprouts.Association
-
Returns a
Set
of all the keys in this association. - keyType() - Method in interface sprouts.Association
-
Returns the type of the keys in this association.
L
- last() - Method in interface sprouts.Tuple
-
Exposes the last item in the tuple of items.
- last() - Method in interface sprouts.Vals
-
Exposes the last property in the list of properties.
- last() - Method in interface sprouts.Vars
-
Exposes the last property in the list of properties.
- lastIndexBefore(int, T) - Method in interface sprouts.Tuple
-
Use this to find the index of an item before a certain index.
- lastIndexOf(T) - Method in interface sprouts.Tuple
-
Use this to find the last index of an item in the tuple sequence.
- Lens<A,
B> - Interface in sprouts -
The
Lens
interface defines an access and update operation on an individual part of a nested and immutable data structure. - lensOf(Var<T>, B, Lens<T, B>) - Method in class sprouts.impl.Sprouts
- lensOf(Var<T>, B, Lens<T, B>) - Method in interface sprouts.impl.SproutsFactory
- lensOf(Var<T>, Lens<T, B>) - Method in class sprouts.impl.Sprouts
- lensOf(Var<T>, Lens<T, B>) - Method in interface sprouts.impl.SproutsFactory
- lensOfNullable(Class<B>, Var<T>, Lens<T, B>) - Method in class sprouts.impl.Sprouts
- lensOfNullable(Class<B>, Var<T>, Lens<T, B>) - Method in interface sprouts.impl.SproutsFactory
- lineage() - Method in class sprouts.Version
-
Exposes the lineage number of this version object, which is a unique identifier that originates from the
Version.create()
method. - logAsDebug() - Method in class sprouts.Problem
-
Logs the problem as a
Logger.debug(java.lang.String)
message to the default logger of the implementing class. - logAsError() - Method in class sprouts.Problem
-
Logs the problem as a
Logger.error(java.lang.String)
message to the default logger of the implementing class. - logAsInfo() - Method in class sprouts.Problem
-
Logs the problem as a
Logger.info(java.lang.String)
message to the default logger of the implementing class. - logAsTrace() - Method in class sprouts.Problem
-
Logs the problem as a
Logger.trace(java.lang.String)
message to the default logger of the implementing class. - logAsWarning() - Method in class sprouts.Problem
-
Logs the problem as a
Logger.warn(java.lang.String)
message to the default logger of the implementing class. - logProblemsAsDebug() - Method in class sprouts.Result
-
Irrespective of this
Result
wrapping a non-null item of typeV
or not, if theResult
has at least oneProblem
, then an invocation to this method will generate a rich context message and stack trace from its problems and then log them as debug to theLogger.debug(String, Throwable)
method, orSystem.out
, if Slf4j does not have a logger backend.
It returns the result itself, so you can chain it with other methods. - logProblemsAsError() - Method in class sprouts.Result
-
Irrespective of this
Result
wrapping a non-null item of typeV
or not, if theResult
has at least oneProblem
, then an invocation to this method will generate a rich context message and stack trace from its problems and then log them as errors to theLogger.error(String, Throwable)
method, orSystem.err
, if Slf4j does not have a logger backend.
It returns the result itself, so you can chain it with other methods. - logProblemsAsInfo() - Method in class sprouts.Result
-
Irrespective of this
Result
wrapping a non-null item of typeV
or not, if theResult
has at least oneProblem
, then an invocation to this method will generate a rich context message and stack trace from its problems and then log them as info to theLogger.info(String, Throwable)
method, orSystem.out
, if Slf4j does not have a logger backend.
It returns the result itself, so you can chain it with other methods. - logProblemsAsTrace() - Method in class sprouts.Result
-
Irrespective of this
Result
wrapping a non-null item of typeV
or not, if theResult
has at least oneProblem
, then an invocation to this method will generate a rich context message and stack trace from its problems and then log them as trace to theLogger.trace(String, Throwable)
method, orSystem.out
, if Slf4j does not have a logger backend.
It returns the result itself, so you can chain it with other methods. - logProblemsAsWarning() - Method in class sprouts.Result
-
Irrespective of this
Result
wrapping a non-null item of typeV
or not, if theResult
has at least oneProblem
, then an invocation to this method will generate a rich context message and stack trace from its problems and then log them as warnings to theLogger.warn(String, Throwable)
method, orSystem.err
, if Slf4j does not have a logger backend.
It returns the result itself, so you can chain it with other methods. - logProblemsTo(BiConsumer<String, Throwable>) - Method in class sprouts.Result
-
If this
Result
wraps a non-null item of typeV
, then this method will do nothing. - logTo(BiConsumer<String, Throwable>) - Method in class sprouts.Problem
-
Allows you to log the problem to a custom logger of your choice, by supplying a
BiConsumer
which takes a string message as the first argument and aThrowable
as the second argument.
M
- makeDistinct() - Method in class sprouts.impl.TupleTree
- makeDistinct() - Method in class sprouts.impl.TupleWithDiff
- makeDistinct() - Method in interface sprouts.Tuple
-
Returns a new tuple of unique items, meaning that all duplicates in the original tuple are absent in the returned tuple.
- makeDistinct() - Method in interface sprouts.Vars
-
Removes all duplicate properties from
this
list of properties. - map(Function<T, T>) - Method in interface sprouts.Maybe
-
If the item is present, applies the provided mapping function to it, and returns it wrapped in a new
Maybe
instance. - map(Function<T, T>) - Method in interface sprouts.Tuple
-
Returns a new tuple of items where each item is the result of applying the supplied mapper
Function
to the corresponding item in this tuple. - map(Function<T, T>) - Method in interface sprouts.Val
-
If the item is present, applies the provided mapping function to it, and returns it wrapped in a new
Val
instance. - map(Function<T, T>) - Method in interface sprouts.Vals
-
Use this for mapping a list of properties to another list of properties.
- map(Function<T, T>) - Method in interface sprouts.Var
-
If the item is present, then this applies the provided mapping function to it, and return it wrapped in a new
Var
instance. - map(Function<T, T>) - Method in interface sprouts.Vars
-
Use this for mapping a list of properties to another list of properties.
- map(Function<V, V>) - Method in class sprouts.Result
-
Safely maps the value of this result to a new value of the same type even if an exception is thrown during the mapping process, in which case the exception is caught and a new result is returned with the exception as a problem.
- mapTo(Class<U>, Function<T, U>) - Method in interface sprouts.Maybe
-
If the item is present, applies the provided mapping function to it, and returns it wrapped in a new
Maybe
instance. - mapTo(Class<U>, Function<T, U>) - Method in interface sprouts.Vals
-
Use this for mapping a list of properties to another list of properties.
- mapTo(Class<U>, Function<T, U>) - Method in interface sprouts.Vars
-
Use this for mapping a list of properties to another list of properties.
- mapTo(Class<U>, Function<T, U>) - Method in interface sprouts.Var
-
If the item is present, applies the provided mapping function to it, and returns it wrapped in a new
Var
instance. - mapTo(Class<U>, Function<T, U>) - Method in interface sprouts.Tuple
-
Returns a new tuple of items where each item is mapped to a new item of the specified type using the supplied mapper function.
- mapTo(Class<U>, Function<T, U>) - Method in interface sprouts.Val
-
If the item is present, applies the provided mapping function to it, and returns it wrapped in a new
Val
instance. - mapTo(Class<U>, Function<V, U>) - Method in class sprouts.Result
-
Safely maps the value of this result to a new value of a different type even if an exception is thrown during the mapping process, in which case the exception is caught and a new result is returned with the exception as a problem.
- Maybe<T> - Interface in sprouts
-
The
Maybe
interface represents a thing of a specificMaybe.type()
which may or may not exist, and it serves as anull
safe blue-print for nomadic types like theResult
type. - maybeAdd(Maybe<T>) - Method in interface sprouts.Tuple
-
Creates and returns a new tuple with the item of the supplied
Maybe
appended to the end of the tuple of items. - maybeAddAll(Maybe<T>...) - Method in interface sprouts.Tuple
-
Creates and returns an updated tuple of items where the items of the provided
Maybe
are appended at the end of the new item sequence. - maybeAddAllAt(int, Maybe<T>...) - Method in interface sprouts.Tuple
-
Creates an updated tuple of items where the items of the provided
Maybe
are all inserted at the specified index. - maybeAddAt(int, Maybe<T>) - Method in interface sprouts.Tuple
-
Creates a tuple where the item of the supplied
Maybe
is inserted to the tuple at the specified index. - maybeContains(Maybe<T>) - Method in interface sprouts.Tuple
-
Check if the value of the supplied
Maybe
is wrapped by any of the items in this tuple. - maybeOf(Maybe<T>) - Method in interface sprouts.impl.SproutsFactory
- maybeOf(T) - Method in interface sprouts.impl.SproutsFactory
- maybeOfNull(Class<T>) - Method in interface sprouts.impl.SproutsFactory
- maybeOfNullable(Class<T>, T) - Method in interface sprouts.impl.SproutsFactory
- maybeOfNullable(Maybe<T>) - Method in interface sprouts.impl.SproutsFactory
- maybeRemove(Maybe<T>) - Method in interface sprouts.Tuple
-
Removes every occurrence of the item of the supplied
Maybe
from the tuple. - maybeRemoveFirstFound(Maybe<T>) - Method in interface sprouts.Tuple
-
Removes the tem of the provided
Maybe
from the tuple. - maybeRemoveFirstFoundOrThrow(Maybe<T>) - Method in interface sprouts.Tuple
-
Removes the item of the provided
Maybe
from the tuple. - maybeSetAllAt(int, Maybe<T>...) - Method in interface sprouts.Tuple
-
Creates an updated tuple of items where the items of the provided
Maybe
objects are replacing the items in this tuple, starting at the specified index. - maybeSetAt(int, int, Maybe<T>) - Method in interface sprouts.Tuple
-
Places the provided property in the specified sequence, effectively replacing the items at the specified sequence with the given property.
- maybeSetAt(int, Maybe<T>) - Method in interface sprouts.Tuple
-
Places the item of the supplied
Maybe
at the specified index, effectively replacing the existing item at that index. - maybeSetRange(int, int, Maybe<T>) - Method in interface sprouts.Tuple
-
Places the provided property in the specified range, effectively replacing the items in the specified range with the given property.
- MissingItemException - Exception Class in sprouts
- MissingItemException(String) - Constructor for exception class sprouts.MissingItemException
-
Creates a new
MissingItemException
with the given message and noProblem
information about the cause of the exception. - MissingItemException(String, Tuple<Problem>) - Constructor for exception class sprouts.MissingItemException
-
Creates a new
MissingItemException
with the given message anf tuple of problems describing the cause of the exception. - MissingItemRuntimeException - Exception Class in sprouts
-
A non-checked runtime exception thrown when an item is missing from a
Maybe
object. - MissingItemRuntimeException(String) - Constructor for exception class sprouts.MissingItemRuntimeException
-
Creates a new
MissingItemRuntimeException
with the given message and noProblem
information about the cause of the exception. - MissingItemRuntimeException(String, Tuple<Problem>) - Constructor for exception class sprouts.MissingItemRuntimeException
-
Creates a new
MissingItemRuntimeException
with the given message anf tuple of problems describing the cause of the exception.
N
- NEW_THREAD - Static variable in interface sprouts.Event.Executor
-
A
Event.Executor
that executes the givenRunnable
on a new thread. - newValues() - Method in interface sprouts.ValsDelegate
-
Exposes a read only property list after the change has been applied, which contains the new values in the property list.
- next() - Method in class sprouts.Version
-
Creates a new version object with the same lineage as this one, but with a succession number incremented by one.
- none(Predicate<E>) - Method in interface sprouts.ValueSet
-
Applies the supplied predicate lambda to all elements in this value set and returns
true
if none of them match the predicate, otherwisefalse
. - none(Predicate<Pair<K, V>>) - Method in interface sprouts.Association
-
Checks if none of the key-value pairs in this association match the given predicate and returns
true
if none of them do, otherwisefalse
. - none(Predicate<Val<T>>) - Method in interface sprouts.Vals
-
Check if none of the properties in this list match the given predicate.
- none(Predicate<T>) - Method in interface sprouts.Tuple
-
Check if none of the items in this tuple match the given predicate.
- NONE - Enum constant in enum class sprouts.SequenceChange
-
Indicates that the
Vars
instance was not mutate (But the change event was still triggered). - NONE - Enum constant in enum class sprouts.SingleChange
-
No change occurred.
- numberOfChangeListeners() - Method in class sprouts.impl.PropertyChangeListeners
-
Returns the number of change listeners that are currently registered.
- numberOfChangeListeners() - Method in class sprouts.impl.PropertyListChangeListeners
-
Returns the number of change listeners registered for the property list.
O
- observable() - Method in interface sprouts.Event
-
Creates a weakly referenced
Observable
that can be used to subscribe to thisEvent
by registeringObserver
s that will be notified when theEvent.fire()
method is called. - Observable - Interface in sprouts
-
This represents an event that can be observed but not triggered.
- Observer - Interface in sprouts
- of(boolean, Class<T>, T...) - Static method in class sprouts.impl.TupleTree
-
Creates a new
TupleTree
with the given array of items. - of(boolean, Class<T>, List<T>) - Static method in class sprouts.impl.TupleTree
-
Creates a new
TupleTree
with the given list of items. - of(boolean, Class<T>, List<T>) - Static method in class sprouts.impl.TupleWithDiff
-
Creates a new instance of
TupleWithDiff
with the given items. - of(byte[]) - Static method in interface sprouts.Tuple
-
Creates an immutable tuple of non-nullable items from a primitive array of bytes.
- of(double[]) - Static method in interface sprouts.Tuple
-
Creates an immutable, non-nullable
Tuple<Double>
from a primitive array of doubles. - of(float[]) - Static method in interface sprouts.Tuple
-
Creates an immutable, non-nullable
Tuple<Float>
from a primitive array of floats. - of(int[]) - Static method in interface sprouts.Tuple
-
Creates an immutable tuple of non-nullable items from a primitive array of integers.
- of(long[]) - Static method in interface sprouts.Tuple
-
Creates an immutable tuple of non-nullable items from a primitive array of longs.
- of(E) - Static method in interface sprouts.ValueSet
-
Creates a new value set from a single non-null element.
- of(E, E...) - Static method in interface sprouts.ValueSet
-
Creates a new value set from the given elements.
- of(T) - Static method in interface sprouts.Maybe
-
This factory method creates and returns a
Maybe
representing the supplied non-null
item similar toOptional.of(Object)
. - of(F, S) - Static method in class sprouts.Pair
-
A factory method for creating a new pair with the given values.
- of(Class<E>, Iterable<E>) - Static method in interface sprouts.ValueSet
-
Creates a new value set from the given
Iterable
of elements. - of(Class<E>) - Static method in interface sprouts.ValueSet
-
Creates a new value set specifically for holding elements of the supplied type.
- of(Class<R>, Val<T>, Val<U>, BiFunction<T, U, R>) - Static method in interface sprouts.Viewable
-
Creates an observable read-only
Viewable
property that represents a live view of the two given properties using a combiner function. - of(Class<T>) - Static method in interface sprouts.Tuple
-
Creates an empty tuple of non-nullable items from the supplied type.
- of(Class<T>) - Static method in interface sprouts.Vals
-
Create a new empty
Vals
instance. - of(Class<T>) - Static method in interface sprouts.Vars
-
Creates an empty list of non-nullable properties from the supplied type.
- of(Class<T>, T, T) - Static method in enum class sprouts.SingleChange
-
Determines the type of change between two supplied values of type
T
. - of(Class<T>, Iterable<Val<T>>) - Static method in interface sprouts.Vals
-
Create a new
Vals
instance from the iterable of properties. - of(Class<T>, Iterable<Var<T>>) - Static method in interface sprouts.Vars
-
Creates a list of non-nullable properties from the supplied type and iterable of values.
- of(Class<T>, Iterable<T>) - Static method in interface sprouts.Tuple
-
Creates an immutable tuple of non-nullable items from the supplied type and iterable of values.
- of(Class<T>, Maybe<T>...) - Static method in interface sprouts.Tuple
-
Creates an immutable tuple of non-nullable items from the supplied type and vararg values.
- of(Class<T>, Val<T>...) - Static method in interface sprouts.Vals
-
Create a new
Vals
instance from the given varargs of properties. - of(Class<T>, Vals<T>) - Static method in interface sprouts.Vals
-
Create a new unconnected
Vals
instance from the given property list. - of(Class<T>, Var<T>...) - Static method in interface sprouts.Vars
-
Creates a list of non-nullable properties from the supplied type and vararg values.
- of(Class<T>, T...) - Static method in interface sprouts.Tuple
-
Creates an immutable tuple of non-nullable items from the supplied type and values.
- of(Class<T>, T...) - Static method in interface sprouts.Vals
-
Create a new
Vals
instance from the supplied type and items array. - of(Class<T>, T...) - Static method in interface sprouts.Vars
-
Creates a list of non-nullable properties from the supplied type and values.
- of(Class<T>, V) - Static method in interface sprouts.Var
-
This factory method returns a
Var
describing the given non-null
item similar toOptional.of(Object)
and its type which may also be a super type of the supplied item. - of(Class<V>) - Static method in class sprouts.Result
-
A factory method for creating an empty result without a value and no problems.
- of(Class<V>, V) - Static method in class sprouts.Result
-
A factory method for creating a result with a potentially null value but no problems.
- of(Class<V>, V, Iterable<Problem>) - Static method in class sprouts.Result
-
A factory method for creating a result with a potentially null value and a list of problems.
- of(Class<V>, V, Problem) - Static method in class sprouts.Result
-
A factory method for creating an optional result with a single problem.
- of(Class<V>, Iterable<Problem>) - Static method in class sprouts.Result
-
A factory method for creating an empty result and a list of problems.
- of(Class<V>, Problem) - Static method in class sprouts.Result
-
A factory method for creating a result with a single problem.
- of(Exception) - Static method in class sprouts.Problem
-
A factory method for creating a problem from an
Exception
. - of(Object, String, String) - Static method in class sprouts.Problem
-
A factory method for creating a problem with a title, a description and a reporter.
- of(String) - Static method in class sprouts.Problem
-
A factory method for creating a problem with a title (and no description).
- of(String, String) - Static method in class sprouts.Problem
-
A factory method for creating a problem with a title and a description.
- of(Function<A, B>, BiFunction<A, B, A>) - Static method in interface sprouts.Lens
-
Creates a new lens from the given getter and wither functions, where the first function serves as an implementation of
Lens.getter(Object)
and the second function serves as an implementation ofLens.wither(Object, Object)
. - of(Map.Entry<? extends F, ? extends S>) - Static method in class sprouts.Pair
-
A factory method for creating a new pair from a
Map.Entry
. - of(K, V) - Static method in interface sprouts.Association
-
Creates a new association from the given key-value pair.
- of(Maybe<T>) - Static method in interface sprouts.Maybe
- of(Maybe<T>, Maybe<T>...) - Static method in interface sprouts.Tuple
-
Creates an immutable tuple of non-nullable items from one or more non-nullable items wrapped by
Maybe
properties. - of(Tuple<?>, SequenceChange, int, int) - Static method in class sprouts.impl.SequenceDiff
-
Creates a new
SequenceDiff
instance from a sourceTuple
instance and how it was changed to a new state. - of(Tuple<E>) - Static method in interface sprouts.ValueSet
-
Creates a new value set from the given
Tuple
of elements. - of(Val<T>) - Static method in interface sprouts.Val
- of(Val<T>, Val<T>...) - Static method in interface sprouts.Vals
-
Create a new
Vals
instance from the supplied properties. - of(Val<T>, Val<U>, BiFunction<T, U, T>) - Static method in interface sprouts.Viewable
-
Creates an observable read-only
Viewable
property that represents a live view of the two given properties using a combiner function. - of(Var<T>, Var<T>...) - Static method in interface sprouts.Vars
-
Creates a list of non-nullable properties from one or more non-nullable properties.
- of(T) - Static method in interface sprouts.Val
-
This factory method returns a
Val
describing the given non-null
item similar toOptional.of(Object)
, but specifically designed for use with Swing-Tree. - of(T) - Static method in interface sprouts.Var
-
This factory method returns a
Var
describing the given non-null
item similar toOptional.of(Object)
, but specifically designed to be used for MVVM. - of(T, T...) - Static method in interface sprouts.Tuple
-
Creates an immutable tuple of non-nullable items from one or more non-null items.
- of(T, T...) - Static method in interface sprouts.Vals
-
Create a new
Vals
instance from the supplied items. - of(T, T...) - Static method in interface sprouts.Vars
-
Creates a list of non-nullable properties from one or more non-null values.
- of(V) - Static method in class sprouts.Result
-
A factory method for creating a result with a non-null value and no problems.
- of(V, Iterable<Problem>) - Static method in class sprouts.Result
-
A factory method for creating a result with a non-null value and a list of problems.
- ofLinked(E, E...) - Static method in interface sprouts.ValueSet
-
Creates a new linked value set of one or more elements, where the order of the elements is defined by the insertion order.
- ofLinked(Class<E>) - Static method in interface sprouts.ValueSet
-
Creates a new value set specifically for holding elements of the supplied type, and where the order of the elements is defined by the insertion order.
- ofLinked(Class<E>, Iterable<E>) - Static method in interface sprouts.ValueSet
-
Creates a new linked value of the supplied type as well as elements from the supplied
Iterable
to it, where the order of the elements is defined by the insertion order. - ofLinked(K, V) - Static method in interface sprouts.Association
-
Creates a new linked association from the given key-value pair where the types of the key and value are inferred from the two supplied objects.
A linked association is an association where the order of the key-value pairs is preserved in the order they are added to the association. - ofLinked(Tuple<E>) - Static method in interface sprouts.ValueSet
-
Creates a new linked value set from the given
Tuple
of elements, where the order of the elements is defined by the insertion order. - ofList(Class<V>, List<V>) - Static method in class sprouts.Result
-
A factory method for creating a list based result from the given list.
- ofList(Class<V>, List<V>, Iterable<Problem>) - Static method in class sprouts.Result
-
A factory method for creating a list based result from the given list and problems.
- ofList(Class<V>, Problem) - Static method in class sprouts.Result
-
A factory method for creating a list based result with a single problem.
- ofNull(Class<T>) - Static method in interface sprouts.Maybe
-
A more concise version of
Maybe.ofNullable(Class, Object)
which is equivalent toMaybe.ofNullable(type, null)
. - ofNull(Class<T>) - Static method in interface sprouts.Val
-
A more concise version of
Val.ofNullable(Class, Object)
which is equivalent toVar.ofNullable(type, null)
. - ofNull(Class<T>) - Static method in interface sprouts.Var
-
A more concise version of
Var.ofNullable(Class, Object)
which is equivalent toVar.ofNullable(type, null)
. - ofNullable(Class<T>, T) - Static method in interface sprouts.Maybe
-
Use this factory method to create a new
Maybe
instance whose item may or may not be null. - ofNullable(Class<R>, Val<T>, Val<U>, BiFunction<T, U, R>) - Static method in interface sprouts.Viewable
-
Creates an observable read-only nullable
Viewable
property that represents a live view of the two given properties using a combiner function. - ofNullable(Class<T>) - Static method in interface sprouts.Tuple
-
Creates an empty tuple of nullable items from the supplied type.
- ofNullable(Class<T>) - Static method in interface sprouts.Vals
-
Create a new empty nullable
Vals
instance. - ofNullable(Class<T>) - Static method in interface sprouts.Vars
-
Creates an empty list of nullable properties from the supplied type.
- ofNullable(Class<T>, T) - Static method in interface sprouts.Val
-
Use this factory method to create a new
Val
instance whose item may or may not be null. - ofNullable(Class<T>, T) - Static method in interface sprouts.Var
-
Use this factory method to create a new
Var
instance whose item may or may not be null. - ofNullable(Class<T>, T...) - Static method in interface sprouts.Tuple
-
Creates an immutable tuple of nullable items from the supplied type and values.
- ofNullable(Class<T>, T...) - Static method in interface sprouts.Vals
-
Create a new
Vals
instance from the given items. - ofNullable(Class<T>, T...) - Static method in interface sprouts.Vars
-
Creates a list of nullable properties from the supplied type and values.
- ofNullable(Class<T>, Iterable<T>) - Static method in interface sprouts.Tuple
-
Creates an immutable tuple of nullable items from the supplied type and iterable of values.
- ofNullable(Class<T>, Iterable<Var<T>>) - Static method in interface sprouts.Vars
-
Creates a list of nullable properties from the supplied type and iterable of values.
- ofNullable(Class<T>, Maybe<T>...) - Static method in interface sprouts.Tuple
-
Creates an immutable tuple of nullable items from the supplied type and varargs items.
- ofNullable(Class<T>, Val<T>...) - Static method in interface sprouts.Vals
-
Create a new
Vals
instance from the given items. - ofNullable(Class<T>, Vals<T>) - Static method in interface sprouts.Vals
-
Create a new unconnected
Vals
instance from the given property list. - ofNullable(Class<T>, Var<T>...) - Static method in interface sprouts.Vars
-
Creates a list of nullable properties from the supplied type and varargs properties.
- ofNullable(Maybe<T>, Maybe<T>...) - Static method in interface sprouts.Tuple
-
Creates an immutable tuple of nullable items from the supplied items.
- ofNullable(Maybe<T>) - Static method in interface sprouts.Maybe
- ofNullable(Val<T>) - Static method in interface sprouts.Val
- ofNullable(Val<T>, Val<T>...) - Static method in interface sprouts.Vals
-
Create a new
Vals
instance from the given items. - ofNullable(Val<T>, Val<U>, BiFunction<T, U, T>) - Static method in interface sprouts.Viewable
-
Creates an observable read-only nullable
Viewable
property that represents a live view of the two given properties using a combiner function. - ofNullable(Var<T>, Var<T>...) - Static method in interface sprouts.Vars
-
Creates a list of nullable properties from the supplied properties.
- ofSorted(E, E...) - Static method in interface sprouts.ValueSet
-
Creates a new sorted value set of one or more
Comparable
elements. - ofSorted(Class<E>) - Static method in interface sprouts.ValueSet
-
Creates a new value set specifically for holding elements of the supplied type, elements are sorted based on the natural ordering of the elements (which are expected to implement
Comparable
). - ofSorted(Class<E>, Comparator<E>) - Static method in interface sprouts.ValueSet
-
Creates a new value set specifically for holding elements of the supplied type, but with an explicit order defined by the supplied comparator.
- ofSorted(K, V, Comparator<K>) - Static method in interface sprouts.Association
-
Creates a new association from the given key-value pair with the given comparator for sorting the keys.
- ofSorted(Tuple<E>) - Static method in interface sprouts.ValueSet
-
Creates a new sorted value set from the given
Tuple
ofComparable
elements.
The type of the elements is captured from the tuple itself through theTuple.type()
method. - ofSorted(Tuple<E>, Comparator<E>) - Static method in interface sprouts.ValueSet
-
Creates a new sorted value set from the given
Tuple
of elements, with an explicit order defined by the suppliedComparator
. - ofTry(Class<V>, ResultItemSupplier<V>) - Static method in class sprouts.Result
-
A factory method for creating a
Result
from aResultItemSupplier
lambda which may throw a checked or uncheckedException
, but won't break the control flow of your application.
If the supplier throws an exception, the exception is caught and a new result is returned with the exception as a problem.
Note that this does not catchError
subtypes, likeOutOfMemoryError
orStackOverflowError
because they represent severe platform errors, which are considered unrecoverable problems that applications should not typically attempt to handle.
Only application errors (Exception
s) are caught and wrapped safely asResult
. - ofTry(ResultRunAttempt) - Static method in class sprouts.Result
-
A factory method for creating a
Result
from aResultRunAttempt
lambda which may throw a checked or uncheckedException
, but won't break the control flow of your application.
If the run attempt throws an exception, the exception is caught and a new result is returned with the exception as a problem. - oldValue() - Method in interface sprouts.ValDelegate
-
Exposes the old value of the property that was listened to in an
Maybe
wrapper. - oldValues() - Method in interface sprouts.ValsDelegate
-
Exposes a read only property list of old values which were removed from the property list.
- onChange(Action<ValsDelegate<T>>) - Method in class sprouts.impl.PropertyListChangeListeners
-
Registers a change listener for any changes in the property list.
- onChange(Action<ValsDelegate<T>>) - Method in interface sprouts.Viewables
-
Similar to
Viewable.onChange(Channel, Action)
but for a list of properties. - onChange(Channel, Action<ValDelegate<T>>) - Method in class sprouts.impl.PropertyChangeListeners
-
Adds a change listener for the given channel.
- onChange(Channel, Action<ValDelegate<T>>) - Method in interface sprouts.Viewable
- onChange(Observer) - Method in class sprouts.impl.PropertyChangeListeners
-
Adds a plain observer (has no delegate) as a change listener for the default channel.
- onChange(Observer) - Method in class sprouts.impl.PropertyListChangeListeners
-
Registers a plain observer (has no delegate) as a change listener for any changes in the property list.
- or(Supplier<? extends Maybe<? extends T>>) - Method in interface sprouts.Maybe
-
If an item is present, returns a
Maybe
describing the item, otherwise returns aMaybe
produced by the supplying function. - or(Supplier<? extends Maybe<? extends T>>) - Method in interface sprouts.Val
-
If an item is present, returns a
Val
describing the item, otherwise returns aVal
produced by the supplying function. - orElse(T) - Method in interface sprouts.Maybe
-
If an item is present, returns the item, otherwise returns
other
, but nevenull
. - orElse(V) - Method in class sprouts.Result
-
If an item is present, returns the item, otherwise returns
other
, but nevenull
. - orElseGet(Supplier<? extends T>) - Method in interface sprouts.Maybe
-
If an item is present, returns the item, otherwise returns the result produced by the supplying function.
- orElseGet(Supplier<? extends V>) - Method in class sprouts.Result
-
If an item is present, returns the item, otherwise returns the result produced by the supplying function.
- orElseHandle(Function<Tuple<Problem>, V>) - Method in class sprouts.Result
- orElseNull() - Method in interface sprouts.Maybe
-
If an item is present, returns the item, otherwise returns
null
. - orElseNull() - Method in class sprouts.Result
-
If an item is present, returns the item, otherwise returns
null
. - orElseNullable(T) - Method in interface sprouts.Maybe
-
If an item is present, returns the item, otherwise returns
other
. - orElseNullable(V) - Method in class sprouts.Result
-
If an item is present, returns the item, otherwise returns
other
. - orElseThrow() - Method in interface sprouts.Maybe
-
If an item is present, returns the item, otherwise throws a checked
MissingItemException
, requiring you to handle it explicitly in your code. - orElseThrow() - Method in class sprouts.Result
-
If an item is present, returns the item, otherwise throws a checked
MissingItemException
, requiring you to handle it explicitly in your code. - orElseThrowProblems(Function<Tuple<Problem>, E>) - Method in class sprouts.Result
-
Returns the contained non-null value if present, otherwise throws an exception created by the provided supplier function.
- orElseThrowProblemsUnchecked(Function<Tuple<Problem>, RuntimeException>) - Method in class sprouts.Result
-
Returns the contained non-null value if present, otherwise throws a runtime exception created by the provided supplier function.
- orElseThrowUnchecked() - Method in interface sprouts.Maybe
-
If an item is present, returns the item, otherwise throws an unchecked
MissingItemRuntimeException
. - orElseThrowUnchecked() - Method in class sprouts.Result
-
If an item is present, returns the item, otherwise throws an unchecked
MissingItemRuntimeException
.
P
- Pair<F,
S> - Class in sprouts -
An immutable value object representing a pair of two generic values.
- parallelStream() - Method in interface sprouts.Tuple
-
Turns this tuple of items into a parallel stream of items which can be used for further functional processing.
- parallelStream() - Method in interface sprouts.ValueSet
-
Returns a parallel
Stream
with this value set as its source. - peekAtEachProblem(Consumer<Problem>) - Method in class sprouts.Result
-
Allows you to peek at each problem inside this result through a
Consumer
which receives one problem at a time. - peekAtProblems(Consumer<Tuple<Problem>>) - Method in class sprouts.Result
-
Allows you to peek at the list of problems associated with this result through a
Consumer
which receives the list of all problems. - Performance Characteristics - Search tag in class sprouts.impl.TupleTree
- Section
- popAt(int) - Method in interface sprouts.Vars
-
Removes and returns the property at the specified index.
- popAt(int, int) - Method in interface sprouts.Vars
-
Removes and returns the sequence of properties at the specified index.
- popFirst() - Method in interface sprouts.Vars
-
Removes the first property from the list and returns it.
- popFirst(int) - Method in interface sprouts.Vars
-
Removes the first
count
number of properties from the list and returns them in a new list. - popIf(Predicate<Var<T>>) - Method in interface sprouts.Vars
-
Removes all properties from the list for which the provided predicate returns true and returns them in a new list.
- popIfItem(Predicate<T>) - Method in interface sprouts.Vars
-
Removes all properties from the list for whose items the provided predicate returns true and returns them in a new list.
- popLast() - Method in interface sprouts.Vars
-
Removes the last property from the list and returns it.
- popLast(int) - Method in interface sprouts.Vars
-
Removes
count
number of properties from the end of the list and returns them in a new list. - popRange(int, int) - Method in interface sprouts.Vars
-
Remove and return all elements within the range
from
inclusive andto
exclusive. - previous() - Method in class sprouts.Version
-
Creates a new version object with the same lineage as this one, but with a succession number decremented by one.
- printStackTrace() - Method in exception class sprouts.MissingItemException
- printStackTrace() - Method in exception class sprouts.MissingItemRuntimeException
- printTo(PrintWriter) - Method in class sprouts.Problem
-
Prints the title and description and optionally the exception to the given writer.
- printTo(Writer) - Method in class sprouts.Problem
-
Prints the title and description and optionally the exception to the given writer.
- printToSystemOut() - Method in class sprouts.Problem
-
Prints the title and description and optionally the exception to the standard output stream.
- Problem - Class in sprouts
-
A problem is a wrapper for information describing an issue that can be reported and attached to a
Result
. - problems() - Method in exception class sprouts.MissingItemException
-
Returns a
Tuple
of all problems that caused this exception. - problems() - Method in exception class sprouts.MissingItemRuntimeException
-
Returns a
Tuple
of all problems that caused this exception. - problems() - Method in class sprouts.Result
-
Exposes a list of
Problem
s associated with this result item. - PropertyChangeListeners<T> - Class in sprouts.impl
-
This class is technically an internal class and should not be used directly.
- PropertyChangeListeners() - Constructor for class sprouts.impl.PropertyChangeListeners
-
Creates a new instance of
PropertyChangeListeners
, without any listeners. - PropertyChangeListeners(PropertyChangeListeners<T>) - Constructor for class sprouts.impl.PropertyChangeListeners
-
Creates a new instance of
PropertyChangeListeners
by copying the listeners from another instance. - PropertyListChangeListeners<T> - Class in sprouts.impl
-
A class that manages change listeners for a list of properties (Vals or Vars).
This class is technically an internal class and should not be used directly. - PropertyListChangeListeners() - Constructor for class sprouts.impl.PropertyListChangeListeners
-
Creates a new instance of
PropertyListChangeListeners
, without any listeners. - put(K, V) - Method in interface sprouts.Association
-
Returns a new association that is the same as this one but with the given key associated with the given value.
- put(Pair<? extends K, ? extends V>) - Method in interface sprouts.Association
-
Returns a new association that is the same as this one but with the given key-value pair added to it through a
Pair
instance, where the first value of the pair is the key and the second value is the value. - putAll(Collection<Pair<? extends K, ? extends V>>) - Method in interface sprouts.Association
-
Returns a new association with all the key-value pairs from the supplied
Collection
ofPair
instances added to it. - putAll(Map<? extends K, ? extends V>) - Method in interface sprouts.Association
-
Returns a new association with all the key-value pairs from the supplied
Map
added to it. - putAll(Set<Pair<? extends K, ? extends V>>) - Method in interface sprouts.Association
- putAll(Stream<Pair<? extends K, ? extends V>>) - Method in interface sprouts.Association
- putAll(Association<? extends K, ? extends V>) - Method in interface sprouts.Association
-
Returns a new association that is the same as this one but with all the key-value pairs from the given association added to it.
- putAll(Pair<? extends K, ? extends V>...) - Method in interface sprouts.Association
-
Returns a new association with all the key-value pairs from the supplied array of
Pair
s added to it, where thePair.first()
is the key and thePair.second()
is the value. - putAll(Tuple<Pair<? extends K, ? extends V>>) - Method in interface sprouts.Association
-
Returns a new association with all the key-value pairs of the supplied
Tuple
ofPair
instances added to it, where thePair.first()
object of each pair is the key and thePair.second()
object is the value. - putIfAbsent(K, V) - Method in interface sprouts.Association
-
If the specified key is not already associated with a value associates it with the given value and returns
null
, else returns the current value.
R
- remove(E) - Method in interface sprouts.ValueSet
-
Returns a new value set without the supplied element, but all other elements still kept.
- remove(K) - Method in interface sprouts.Association
-
Returns a new association that is the same as this one but without the given key.
- remove(Var<T>) - Method in interface sprouts.Vars
-
Removes every occurrence of the provided property from the list.
- remove(T) - Method in interface sprouts.Tuple
-
Removes every occurrence of the supplied item from the tuple.
- remove(T) - Method in interface sprouts.Vars
-
Removes every occurrence of the supplied item from the list.
- REMOVE - Enum constant in enum class sprouts.SequenceChange
-
Indicates that a value was removed from the
Vars
instance. - removeAll(E...) - Method in interface sprouts.ValueSet
-
Returns a new value set that is the same as this one but without any of the elements in the supplied array.
- removeAll(Iterable<? extends E>) - Method in interface sprouts.ValueSet
-
Returns a new value set that is the same as this one but without any of the elements in the supplied
Iterable
. - removeAll(Iterable<T>) - Method in interface sprouts.Tuple
-
Removes all the items of the provided iterable from the tuple.
- removeAll(Collection<? extends E>) - Method in interface sprouts.ValueSet
-
Returns a new value set that is the same as this one but without any of the elements in the supplied
Collection
. - removeAll(Set<? extends E>) - Method in interface sprouts.ValueSet
-
Returns a new value set that is the same as this one but without any of the elements in the supplied set.
- removeAll(Set<? extends K>) - Method in interface sprouts.Association
-
Returns a new association that is the same as this one but without any of the keys in the supplied set.
- removeAll(Stream<? extends E>) - Method in interface sprouts.ValueSet
-
Returns a new value set that is the same as this one but without any of the elements in the supplied
Stream
. - removeAll(Tuple<? extends E>) - Method in interface sprouts.ValueSet
-
Returns a new value set that is the same as this one but without any of the elements in the supplied
Tuple
. - removeAll(Tuple<T>) - Method in class sprouts.impl.TupleTree
- removeAll(Tuple<T>) - Method in class sprouts.impl.TupleWithDiff
- removeAll(Tuple<T>) - Method in interface sprouts.Tuple
-
Creates a new tuple of items without the items of the provided tuple of items.
- removeAll(Vals<T>) - Method in interface sprouts.Vars
-
Removes all properties from the list that are contained in the provided list of properties.
- removeAll(ValueSet<? extends E>) - Method in interface sprouts.ValueSet
-
Returns a new value set that is the same as this one but without any of the elements in the supplied value set.
- removeAll(ValueSet<? extends K>) - Method in interface sprouts.Association
-
Returns a new association that is the same as this one but without any of the keys in the supplied set.
- removeAll(T...) - Method in interface sprouts.Tuple
-
Removes all the items of the provided array from the tuple.
- removeAll(T...) - Method in interface sprouts.Vars
-
Removes all properties from the list whose items are contained in the provided array of properties and returns them in a new list.
- removeAt(int) - Method in interface sprouts.Tuple
-
Removes the item at the specified index.
- removeAt(int) - Method in interface sprouts.Vars
-
Removes the property at the specified index.
- removeAt(int, int) - Method in interface sprouts.Tuple
-
Removes the sequence of items at the specified index.
- removeAt(int, int) - Method in interface sprouts.Vars
-
Removes the sequence of properties at the specified index.
- removeFirst() - Method in interface sprouts.Tuple
-
Removes the first item from the tuple, or does nothing if the tuple is empty.
- removeFirst() - Method in interface sprouts.Vars
-
Removes the first property from the list, or does nothing if the list is empty.
- removeFirst(int) - Method in interface sprouts.Tuple
-
Removes the first
count
number of items from the tuple. - removeFirst(int) - Method in interface sprouts.Vars
-
Removes the first
count
number of properties from the list. - removeFirstFound(Var<T>) - Method in interface sprouts.Vars
-
Removes the provided property from the list at its first found occurrence.
- removeFirstFound(T) - Method in interface sprouts.Tuple
-
Removes the first found item in the tuple that is
Objects.equals(Object, Object)
to the supplied item. - removeFirstFound(T) - Method in interface sprouts.Vars
-
Removes the first found property containing the provided item from the list.
- removeFirstFoundIfNonNull(T) - Method in interface sprouts.Tuple
-
Removes the first found item in the tuple that is
Objects.equals(Object, Object)
to the supplied item, or does nothing if the item isnull
. - removeFirstFoundOrThrow(Var<T>) - Method in interface sprouts.Vars
-
Removes the first found occurrence of the provided property from the list.
- removeFirstFoundOrThrow(T) - Method in interface sprouts.Tuple
-
Removes the first found item in the tuple that is
Objects.equals(Object, Object)
to the supplied item, or throws aNoSuchElementException
if the item is not found. - removeFirstFoundOrThrow(T) - Method in interface sprouts.Vars
-
Removes the first occurrence of a property containing the supplied item from the list.
- removeIf(Predicate<Var<T>>) - Method in interface sprouts.Vars
-
Removes all properties from the list for which the provided predicate returns true.
- removeIf(Predicate<T>) - Method in interface sprouts.Tuple
-
Removes all items from the tuple for which the provided predicate returns true.
- removeIfItem(Predicate<T>) - Method in interface sprouts.Vars
-
Removes all properties from the list for whose items the provided predicate returns true.
- removeIfNonNull(T) - Method in interface sprouts.Tuple
-
Removes every occurrence of the supplied item from the tuple, or does nothing if the supplied item is
null
. - removeLast() - Method in interface sprouts.Tuple
-
Removes the last item from the tuple, or does nothing if the tuple is empty.
- removeLast() - Method in interface sprouts.Vars
-
Removes the last property from the list, or does nothing if the list is empty.
- removeLast(int) - Method in interface sprouts.Tuple
-
Removes
count
number of items from the end of the tuple. - removeLast(int) - Method in interface sprouts.Vars
-
Removes
count
number of properties from the end of the list. - removeOrThrow(Var<T>) - Method in interface sprouts.Vars
-
Removes every occurrence of the provided property from the list.
- removeOrThrow(T) - Method in interface sprouts.Vars
-
Removes every property containing the provided item from the list.
- removeRange(int, int) - Method in class sprouts.impl.TupleTree
- removeRange(int, int) - Method in class sprouts.impl.TupleWithDiff
- removeRange(int, int) - Method in interface sprouts.Tuple
-
Remove all elements within the range
from
inclusive andto
exclusive. - removeRange(int, int) - Method in interface sprouts.Vars
-
Remove all elements within the range
from
inclusive andto
exclusive. - replace(K, V) - Method in interface sprouts.Association
-
Returns a new association where an existing key-value pair is replaced with the given key-value pair if the key is present in this association.
- replace(Pair<? extends K, ? extends V>) - Method in interface sprouts.Association
-
Returns a new association where an existing key-value pair is replaced with the given key-value pair if the key is present in this association.
- replaceAll(Collection<Pair<? extends K, ? extends V>>) - Method in interface sprouts.Association
-
Returns a new association where all existing key-value pairs from this association are replaced by those in the supplied
Collection
ofPair
instances. - replaceAll(Map<? extends K, ? extends V>) - Method in interface sprouts.Association
-
Returns a new association where all existing key-value pairs from this association are replaced by those in the supplied
Map
. - replaceAll(Set<Pair<? extends K, ? extends V>>) - Method in interface sprouts.Association
- replaceAll(Stream<Pair<? extends K, ? extends V>>) - Method in interface sprouts.Association
- replaceAll(Association<? extends K, ? extends V>) - Method in interface sprouts.Association
-
Returns a new association where all existing key-value pairs from this association are replaced by those in the supplied association.
- replaceAll(Pair<? extends K, ? extends V>...) - Method in interface sprouts.Association
-
Returns a new association where all existing key-value pairs from this association are replaced by those in the supplied array of
Pair
instances. - replaceAll(Tuple<Pair<? extends K, ? extends V>>) - Method in interface sprouts.Association
- reporter() - Method in class sprouts.Problem
-
A problem object may or may not have a reporter attached to it.
- Result<V> - Class in sprouts
- ResultItemSupplier<T> - Interface in sprouts
-
Supplier of a
Result
's item, which may throw aRuntimeException
or checkedException
when used to supply a result item during an invocation of theResult.ofTry(Class, ResultItemSupplier)
factory method.
This is a functional interface only intended to be used for the result pattern. - ResultRunAttempt - Interface in sprouts
-
Similar to
ResultItemSupplier
, but used for running an operation that does not return a value. - RETAIN - Enum constant in enum class sprouts.SequenceChange
-
Indicates that one or more values remain in the
Vars
instance. - retainAll(E...) - Method in interface sprouts.ValueSet
-
Returns a new value set in which only those elements are kept, which are also present in the supplied array of elements.
- retainAll(Iterable<? extends E>) - Method in interface sprouts.ValueSet
-
Returns a new value set in which only those elements are kept, which are also present in the supplied
Iterable
of elements. - retainAll(Iterable<T>) - Method in interface sprouts.Tuple
-
Removes all items from
this
tuple that are not contained in the provided iterable of items. - retainAll(Collection<? extends E>) - Method in interface sprouts.ValueSet
-
Returns a new value set in which only those elements are kept, which are also present in the supplied
Collection
of elements. - retainAll(Set<? extends E>) - Method in interface sprouts.ValueSet
-
Returns a new value set where only those elements are kept that have an element present in the supplied set.
- retainAll(Set<? extends K>) - Method in interface sprouts.Association
-
Returns a new association where only those key-value pairs are kept that have a key present in the supplied set.
- retainAll(Stream<? extends E>) - Method in interface sprouts.ValueSet
-
Returns a new value set in which only those elements are kept, which are also present in the supplied
Stream
of elements. - retainAll(Tuple<? extends E>) - Method in interface sprouts.ValueSet
-
Returns a new value set in which only those elements are kept, which are also present in the supplied
Tuple
of elements. - retainAll(Tuple<T>) - Method in class sprouts.impl.TupleTree
- retainAll(Tuple<T>) - Method in class sprouts.impl.TupleWithDiff
- retainAll(Tuple<T>) - Method in interface sprouts.Tuple
-
Retains only the items in this tuple that are contained in the provided tuple of items.
- retainAll(Vals<T>) - Method in interface sprouts.Vars
-
Removes all properties from
this
list that are not contained in the provided list of properties. - retainAll(ValueSet<? extends E>) - Method in interface sprouts.ValueSet
-
Returns a new value set where only those elements are kept that have an element present in the supplied value set.
- retainAll(ValueSet<? extends K>) - Method in interface sprouts.Association
-
Returns a new association where only those key-value pairs are kept that have a key present in the supplied value set.
- retainAll(T...) - Method in interface sprouts.Tuple
-
Removes all items from
this
tuple whose items are not contained in the provided array of items. - retainAll(T...) - Method in interface sprouts.Vars
-
Removes all properties from
this
list whose items are not contained in the provided array of items. - retainIf(Predicate<Var<T>>) - Method in interface sprouts.Vars
-
Removes all properties from
this
list which do not satisfy the provided predicate. - retainIf(Predicate<T>) - Method in interface sprouts.Tuple
-
Creates a new tuple of items where only the items that match the predicate are retained.
- REVERSE - Enum constant in enum class sprouts.SequenceChange
-
Indicates tht the order of the elements in the
Vars
instance was reversed. - reversed() - Method in class sprouts.impl.TupleTree
- reversed() - Method in class sprouts.impl.TupleWithDiff
- reversed() - Method in interface sprouts.Tuple
-
Returns a new tuple with the exact same items as this tuple, but in reverse order.
- reversed() - Method in interface sprouts.Vars
-
Reverse the order of the properties in
this
list. - run() - Method in interface sprouts.ResultRunAttempt
-
Runs some operation without returning a value, which may or may not succeed.
S
- SAME_THREAD - Static variable in interface sprouts.Event.Executor
-
A basic
Event.Executor
that executes the givenRunnable
on the same thread. - second() - Method in class sprouts.Pair
-
Returns the second value of this pair, which corresponds to the second parameter of the
Pair.of(Object, Object)
factory method that created this pair. - SequenceChange - Enum Class in sprouts
-
Describes how a
Vars
instance was mutated. - SequenceDiff - Class in sprouts.impl
-
A
SequenceDiff
object holds meta information about aTuple
instance that describes how theTuple
was transformed from its previous state. - SequenceDiffOwner - Interface in sprouts.impl
-
This interface is a sort of marker interface for
Tuple
implementations that can provide aSequenceDiff
object that describes the difference between the current tuple and a previous one (if any), in terms of aSequenceChange
, the index of the change, and the number of changes. - set(Channel, T) - Method in interface sprouts.Var
-
This method provides the ability to modify the state of the wrapper from a custom channel of your choice, usually one of the channels defined in
From
. - set(T) - Method in interface sprouts.Var
-
This method provides the ability to modify the state of the wrapper from the view model channel (see
From.VIEW_MODEL
). - SET - Enum constant in enum class sprouts.SequenceChange
-
Indicates that a value was updated in the
Vars
instance. - setAllAt(int, Iterable<T>) - Method in interface sprouts.Tuple
-
Iterates over the supplied values, and sets them in this tuple as items starting at the specified index.
- setAllAt(int, Iterable<T>) - Method in interface sprouts.Vars
-
Iterates over the supplied values, and sets them in this list as properties starting at the specified index.
- setAllAt(int, Stream<T>) - Method in interface sprouts.Vars
-
Iterates over the supplied stream of values, and sets them in this list as properties starting at the specified index.
- setAllAt(int, Tuple<T>) - Method in class sprouts.impl.TupleTree
- setAllAt(int, Tuple<T>) - Method in class sprouts.impl.TupleWithDiff
- setAllAt(int, Tuple<T>) - Method in interface sprouts.Tuple
-
Creates and returns a new tuple from this one where all items from the provided tuple of items, are set starting at the specified index, effectively replacing the items in the specified range of this tuple in the new tuple.
- setAllAt(int, Vals<T>) - Method in interface sprouts.Vars
-
Iterates over the supplied properties, and sets their items in this list in the form of new property instances starting at the specified index.
- setAllAt(int, Vars<T>) - Method in interface sprouts.Vars
-
Sets all properties from the provided list of properties to
this
list at a specified index. - setAllAt(int, T...) - Method in interface sprouts.Tuple
-
Wraps each provided item in a property and overwrites the existing items in this tuple, starting at the specified index.
- setAllAt(int, T...) - Method in interface sprouts.Vars
-
Wraps each provided item in a property and overwrites the existing properties in this property list, starting at the specified index.
- setAt(int, int, Var<T>) - Method in interface sprouts.Vars
-
Places the provided property in the specified sequence, effectively replacing the properties at the specified sequence with the given property.
- setAt(int, int, T) - Method in interface sprouts.Tuple
-
Creates a new tuple of items where the items starting at the specified index and ending at the specified index plus the size of the sequence are replaced with the supplied item.
- setAt(int, int, T) - Method in interface sprouts.Vars
-
Wraps the specified value in distinct properties and sets them in the specified sequence, effectively replacing the property at that sequence.
- setAt(int, Val<T>) - Method in interface sprouts.Vars
- setAt(int, Var<T>) - Method in interface sprouts.Vars
-
Places the provided property at the specified index, effectively replacing the property at that index.
- setAt(int, T) - Method in class sprouts.impl.TupleTree
- setAt(int, T) - Method in class sprouts.impl.TupleWithDiff
- setAt(int, T) - Method in interface sprouts.Tuple
-
Creates a new tuple of items where the item at the specified index is replaced with the supplied item.
- setAt(int, T) - Method in interface sprouts.Vars
-
Wraps the provided value in a property and sets it at the specified index effectively replacing the property at that index.
- setFactory(SproutsFactory) - Static method in class sprouts.impl.Sprouts
-
Sets the factory to be used by the various factory methods of this API like
Var.of(Object)
,Vals.of(Object, Object[])
... - setRange(int, int, Var<T>) - Method in interface sprouts.Vars
-
Places the provided property in the specified range, effectively replacing the properties in the specified range with the given property.
- setRange(int, int, T) - Method in interface sprouts.Tuple
-
Wraps the specified value in distinct items and sets them in the specified range, effectively replacing the items in the specified range.
- setRange(int, int, T) - Method in interface sprouts.Vars
-
Wraps the specified value in distinct properties and sets them in the specified range, effectively replacing the properties in the specified range.
- signature() - Method in class sprouts.impl.SequenceDiff
-
The signature of this
SequenceDiff
instance. - SingleChange - Enum Class in sprouts
-
A set of constants that describe how a property item has changed.
- size() - Method in interface sprouts.Association
-
Returns the number of key-value pairs in this association.
- size() - Method in class sprouts.impl.SequenceDiff
-
The size of the difference is the number of items that were affected by the change in the
Tuple
. - size() - Method in class sprouts.impl.TupleTree
- size() - Method in class sprouts.impl.TupleWithDiff
- size() - Method in interface sprouts.Tuple
-
Exposes the size of the tuple of items, which is the number of items in the tuple.
- size() - Method in interface sprouts.Vals
-
Exposes the size of the list of properties, which is the number of properties in the list.
- size() - Method in interface sprouts.ValueSet
-
Returns the total number of all elements in this value set.
- slice(int, int) - Method in class sprouts.impl.TupleTree
- slice(int, int) - Method in class sprouts.impl.TupleWithDiff
- slice(int, int) - Method in interface sprouts.Tuple
-
Returns a new tuple of items consisting of the items in the range
from
inclusive andto
exclusive. - sliceAt(int, int) - Method in interface sprouts.Tuple
-
Returns the sequence of items at the specified index with the specified size in a new tuple.
- sliceFirst(int) - Method in interface sprouts.Tuple
-
Removes the first
count
number of items from the tuple and returns them in a new tuple. - sliceLast(int) - Method in interface sprouts.Tuple
-
Removes
count
number of items from the end of the tuple and returns them in a new tuple. - sort() - Method in interface sprouts.Tuple
-
Sorts the tuple of items using the natural ordering of the items.
- sort() - Method in interface sprouts.Vars
-
Sorts the list of properties using the natural ordering of the properties.
- sort(Comparator<E>) - Method in interface sprouts.ValueSet
-
Returns a new sorted value set with the elements in this value set, sorted according to the provided comparator.
- sort(Comparator<K>) - Method in interface sprouts.Association
-
Returns a new association that is the same as this one but with the keys sorted based on the provided
Comparator
. - sort(Comparator<T>) - Method in class sprouts.impl.TupleTree
- sort(Comparator<T>) - Method in class sprouts.impl.TupleWithDiff
- sort(Comparator<T>) - Method in interface sprouts.Tuple
-
Use this for sorting the tuple of items.
- sort(Comparator<T>) - Method in interface sprouts.Vars
-
Use this for sorting the list of properties.
- SORT - Enum constant in enum class sprouts.SequenceChange
-
Indicates that the elements in the
Vars
instance were sorted. - spliterator() - Method in class sprouts.impl.TupleTree
- spliterator() - Method in class sprouts.impl.TupleWithDiff
- sprouts - package sprouts
-
This is the main package for the Sprouts property collections library designed to provide all necessary tools to implement common architectural design patterns like MVVM, MVI, MVL, based on data oriented programming principles (immutability, value objects, lenses, circular data flow, etc.).
- Sprouts - Class in sprouts.impl
- sprouts.impl - package sprouts.impl
-
WARNING: This is considered an internal package.
Do not depend on classes inside this package!
Almost everything in this package is being treated as library-private. - SproutsFactory - Interface in sprouts.impl
-
Creates instances of the various property types in the Sprouts library.
- stream() - Method in interface sprouts.Tuple
-
Turns this tuple of items into a stream of items which can be used for further functional processing.
- stream() - Method in interface sprouts.Vals
-
Turns this list of properties into a stream of items which can be used for further functional processing.
- stream() - Method in interface sprouts.ValueSet
-
Returns a sequential
Stream
with this value set as its source. - Structural Sharing - Search tag in class sprouts.impl.TupleTree
- Section
- subscribe(Observer) - Method in interface sprouts.Observable
-
Subscribes the given listener to this
Observable
so that it can be notified when something happens. - Subscriber - Interface in sprouts
- succession() - Method in class sprouts.Version
-
Exposes the succession number of this version object, which is a non-unique that is incremented or decremented by the
Version.next()
orVersion.previous()
methods.
T
- title() - Method in class sprouts.Problem
-
Every problem has a title, which serves as a short, descriptive identifier.
- to(Function<B, C>, BiFunction<B, C, B>) - Method in interface sprouts.Lens
-
Combines this lens with a pair of getter and wither functions, to create a new lens that focuses on a more deeply nested field.
- to(Lens<B, C>) - Method in interface sprouts.Lens
-
Composes this lens with another lens, creating a new lens that focuses on a more deeply nested field.
- TO_NON_NULL_REFERENCE - Enum constant in enum class sprouts.SingleChange
-
The item changed from a null reference to a non-null reference.
- TO_NULL_REFERENCE - Enum constant in enum class sprouts.SingleChange
-
The item changed from a non-null reference to a null reference.
- toArray() - Method in interface sprouts.Tuple
-
Converts this tuple of items to a plain array of items
- toList() - Method in interface sprouts.Tuple
-
Converts this tuple of items to a JDK
List
of items and then returns the resulting list. - toList() - Method in interface sprouts.Vals
-
Converts this list of properties to a JDK
List
of items and then returns the resulting list. - toMap() - Method in interface sprouts.Association
-
Converts this association to a java.util.Map.
- toMap() - Method in interface sprouts.Vals
-
A list of properties may be turned into a map of items where the keys are the ids of the properties and the values are the items of the properties.
This method performs this conversion and then returns the resulting map. - toOptional() - Method in interface sprouts.Maybe
- toSet() - Method in interface sprouts.Tuple
-
Converts this tuple of items to a JDK
Set
of items and then returns the resulting set. - toSet() - Method in interface sprouts.Vals
-
Takes all the items in this list of properties and turns them into an immutable JDK
Set
of items. - toSet() - Method in interface sprouts.ValueSet
-
Converts this value set to a java.util.Map.
- toString() - Method in class sprouts.impl.PropertyChangeListeners
- toString() - Method in class sprouts.impl.SequenceDiff
- toString() - Method in class sprouts.impl.TupleTree
- toString() - Method in class sprouts.impl.TupleWithDiff
- toString() - Method in class sprouts.Pair
- toString() - Method in class sprouts.Problem
- toString() - Method in class sprouts.Result
- toString() - Method in class sprouts.Version
- toTuple() - Method in interface sprouts.ValueSet
-
Converts this value set to a
Tuple
of all the elements in it, where theTuple.type()
is the same as theValueSet.type()
of this value set. - toValList() - Method in interface sprouts.Vals
-
Converts this list of properties to a JDK
List
of properties and then returns the resulting list. - toValMap() - Method in interface sprouts.Vals
-
A list of properties may be turned into a map of properties where the keys are the ids of the properties and the values are the properties themselves.
This method performs this conversion and then returns the resulting map. - toVals() - Method in interface sprouts.Vars
-
Create a copy of the current state of the list.
- toValueSet() - Method in interface sprouts.Tuple
-
Converts this tuple of items to Sprouts
ValueSet
of unique (non-duplicate) items and then returns the resulting set. - Tuple<T> - Interface in sprouts
-
An immutable collection of ordered items of the same type
T
(seeTuple.type()
), whose items can be iterated over and accessed through their indices.
This class can be thought of as an immutable array with an API designed for functional programming and robust handling ofnull
values.
- tupleOf(byte...) - Method in class sprouts.impl.Sprouts
- tupleOf(byte...) - Method in interface sprouts.impl.SproutsFactory
- tupleOf(double...) - Method in class sprouts.impl.Sprouts
- tupleOf(double...) - Method in interface sprouts.impl.SproutsFactory
- tupleOf(float...) - Method in class sprouts.impl.Sprouts
- tupleOf(float...) - Method in interface sprouts.impl.SproutsFactory
- tupleOf(int...) - Method in class sprouts.impl.Sprouts
- tupleOf(int...) - Method in interface sprouts.impl.SproutsFactory
- tupleOf(long...) - Method in class sprouts.impl.Sprouts
- tupleOf(long...) - Method in interface sprouts.impl.SproutsFactory
- tupleOf(Class<T>) - Method in class sprouts.impl.Sprouts
- tupleOf(Class<T>) - Method in interface sprouts.impl.SproutsFactory
- tupleOf(Class<T>, Iterable<T>) - Method in class sprouts.impl.Sprouts
- tupleOf(Class<T>, Iterable<T>) - Method in interface sprouts.impl.SproutsFactory
- tupleOf(Class<T>, Maybe<T>...) - Method in class sprouts.impl.Sprouts
- tupleOf(Class<T>, Maybe<T>...) - Method in interface sprouts.impl.SproutsFactory
- tupleOf(Class<T>, T...) - Method in class sprouts.impl.Sprouts
- tupleOf(Class<T>, T...) - Method in interface sprouts.impl.SproutsFactory
- tupleOf(Maybe<T>, Maybe<T>...) - Method in interface sprouts.impl.SproutsFactory
- tupleOf(T, T...) - Method in class sprouts.impl.Sprouts
- tupleOf(T, T...) - Method in interface sprouts.impl.SproutsFactory
- tupleOfNullable(Class<T>) - Method in class sprouts.impl.Sprouts
- tupleOfNullable(Class<T>) - Method in interface sprouts.impl.SproutsFactory
- tupleOfNullable(Class<T>, T...) - Method in class sprouts.impl.Sprouts
- tupleOfNullable(Class<T>, T...) - Method in interface sprouts.impl.SproutsFactory
- tupleOfNullable(Class<T>, Iterable<T>) - Method in class sprouts.impl.Sprouts
- tupleOfNullable(Class<T>, Iterable<T>) - Method in interface sprouts.impl.SproutsFactory
- tupleOfNullable(Class<T>, Maybe<T>...) - Method in interface sprouts.impl.SproutsFactory
- tupleOfNullable(Maybe<T>, Maybe<T>...) - Method in interface sprouts.impl.SproutsFactory
- TupleTree<T> - Class in sprouts.impl
-
An immutable, persistent tuple (ordered sequence) implementation based on a multi-branch tree structure.
- TupleWithDiff<T> - Class in sprouts.impl
-
A tuple that contains a difference to the previous state, in the form of a
SequenceDiff
, which contains aSequenceChange
, index, and size of the change among other information. - TupleWithDiff(TupleTree<T>, SequenceDiff) - Constructor for class sprouts.impl.TupleWithDiff
-
Creates a new instance of
TupleWithDiff
with the given data and the difference to the previous state. - type() - Method in class sprouts.impl.TupleTree
- type() - Method in class sprouts.impl.TupleWithDiff
- type() - Method in interface sprouts.Maybe
-
This returns the type of the item wrapped by this
Maybe
which can be accessed by calling theMaybe.orElseThrow()
method. - type() - Method in class sprouts.Result
-
This returns the type of the item wrapped by this
Maybe
which can be accessed by calling theMaybe.orElseThrow()
method. - type() - Method in interface sprouts.Tuple
-
Exposes the common type of the items in this tuple.
The type of the items in this tuple is retrieved from the firstMaybe
in the tuple. - type() - Method in interface sprouts.ValDelegate
-
Exposes the type of the property that was listened to.
- type() - Method in interface sprouts.Vals
-
Exposes the common type of the properties in this list.
The type of the properties in this list is retrieved from the first property in the list. - type() - Method in interface sprouts.ValueSet
-
Returns the
Class
of the type of the elements in this value set. - typeAsString() - Method in interface sprouts.Maybe
-
This method returns a
String
representation of the type of the wrapped item.
U
- unsubscribe(Subscriber) - Method in class sprouts.impl.PropertyChangeListeners
-
Unsubscribes a
Subscriber
from the change listeners. - unsubscribe(Subscriber) - Method in class sprouts.impl.PropertyListChangeListeners
-
Unsubscribes a specific subscriber from the change listeners.
- unsubscribe(Subscriber) - Method in interface sprouts.Observable
-
Unsubscribes the given
Subscriber
from thisObservable
so that it will no longer be notified when something happens. - unsubscribeAll() - Method in class sprouts.impl.PropertyChangeListeners
-
Unsubscribes all change listeners from the change listeners.
- unsubscribeAll() - Method in class sprouts.impl.PropertyListChangeListeners
-
Unsubscribes all subscribers from the change listeners.
- unsubscribeAll() - Method in interface sprouts.Observable
-
Unsubscribes all listeners from this
Observable
. - update(Function<T, T>) - Method in interface sprouts.Var
-
A common use-case is to update the item of a property based on the current item.
- update(Channel, Function<T, T>) - Method in interface sprouts.Var
-
A common use-case is to update the item of a property based on the current item.
- updateNullable(Function<T, T>) - Method in interface sprouts.Var
-
A common use-case is to update the item of a property based on the current item, but this time the item can be null.
- updateNullable(Channel, Function<T, T>) - Method in interface sprouts.Var
-
A common use-case is to update the item of a property based on the current item, but this time the item can be null.
- updateState(Channel, Function<ChangeListeners<ValDelegate<T>>, ChangeListeners<ValDelegate<T>>>) - Method in class sprouts.impl.PropertyChangeListeners
- updateState(Channel, Function<ChangeListeners<ValsDelegate<T>>, ChangeListeners<ValsDelegate<T>>>) - Method in class sprouts.impl.PropertyListChangeListeners
- Usage Example: - Search tag in interface sprouts.Lens
- Section
- Use Cases - Search tag in class sprouts.impl.TupleTree
- Section
- using(Event.Executor) - Static method in interface sprouts.Event
-
Creates a new
Event
that can be observed, triggered and executed asynchronously on a custom event queue, thread pool or any other executor.
V
- Val<T> - Interface in sprouts
-
A read only wrapper around an item which can be mapped to a weakly referenced
Viewable
to then be observed for changes usingAction
s registered through theViewable.onChange(Channel, Action)
method, where theChannel
is used to distinguish between changes from different sources (usually application layers like the view model or the view).
UseVal.view()
to access a simple no-op live view of the item of this property and register change listeners on it to react to state changes. - ValDelegate<T> - Interface in sprouts
- valOf(Val<T>) - Method in class sprouts.impl.Sprouts
- valOf(Val<T>) - Method in interface sprouts.impl.SproutsFactory
- valOf(T) - Method in class sprouts.impl.Sprouts
- valOf(T) - Method in interface sprouts.impl.SproutsFactory
- valOfNull(Class<T>) - Method in class sprouts.impl.Sprouts
- valOfNull(Class<T>) - Method in interface sprouts.impl.SproutsFactory
- valOfNullable(Class<T>, T) - Method in class sprouts.impl.Sprouts
- valOfNullable(Class<T>, T) - Method in interface sprouts.impl.SproutsFactory
- valOfNullable(Val<T>) - Method in class sprouts.impl.Sprouts
- valOfNullable(Val<T>) - Method in interface sprouts.impl.SproutsFactory
- Vals<T> - Interface in sprouts
-
A read only API of a list of read-only viewed properties that can be observed, iterated over, mapped, filtered, turned into a stream, and more.
- ValsDelegate<T> - Interface in sprouts
- valsOf(Class<T>) - Method in class sprouts.impl.Sprouts
- valsOf(Class<T>) - Method in interface sprouts.impl.SproutsFactory
- valsOf(Class<T>, Iterable<Val<T>>) - Method in class sprouts.impl.Sprouts
- valsOf(Class<T>, Iterable<Val<T>>) - Method in interface sprouts.impl.SproutsFactory
- valsOf(Class<T>, Val<T>...) - Method in class sprouts.impl.Sprouts
- valsOf(Class<T>, Val<T>...) - Method in interface sprouts.impl.SproutsFactory
- valsOf(Class<T>, Vals<T>) - Method in class sprouts.impl.Sprouts
- valsOf(Class<T>, Vals<T>) - Method in interface sprouts.impl.SproutsFactory
- valsOf(Class<T>, T...) - Method in class sprouts.impl.Sprouts
- valsOf(Class<T>, T...) - Method in interface sprouts.impl.SproutsFactory
- valsOf(Val<T>, Val<T>...) - Method in class sprouts.impl.Sprouts
- valsOf(Val<T>, Val<T>...) - Method in interface sprouts.impl.SproutsFactory
- valsOf(T, T...) - Method in class sprouts.impl.Sprouts
- valsOf(T, T...) - Method in interface sprouts.impl.SproutsFactory
- valsOfNullable(Class<T>) - Method in class sprouts.impl.Sprouts
- valsOfNullable(Class<T>) - Method in interface sprouts.impl.SproutsFactory
- valsOfNullable(Class<T>, T...) - Method in class sprouts.impl.Sprouts
- valsOfNullable(Class<T>, T...) - Method in interface sprouts.impl.SproutsFactory
- valsOfNullable(Class<T>, Val<T>...) - Method in class sprouts.impl.Sprouts
- valsOfNullable(Class<T>, Val<T>...) - Method in interface sprouts.impl.SproutsFactory
- valsOfNullable(Class<T>, Vals<T>) - Method in class sprouts.impl.Sprouts
- valsOfNullable(Class<T>, Vals<T>) - Method in interface sprouts.impl.SproutsFactory
- valsOfNullable(Val<T>, Val<T>...) - Method in class sprouts.impl.Sprouts
- valsOfNullable(Val<T>, Val<T>...) - Method in interface sprouts.impl.SproutsFactory
- VALUE - Enum constant in enum class sprouts.SingleChange
-
The item changed its value in terms of
Object.equals(Object)
returning false between the old and new value. - valueOf(String) - Static method in enum class sprouts.From
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class sprouts.SequenceChange
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class sprouts.SingleChange
-
Returns the enum constant of this class with the specified name.
- values() - Method in interface sprouts.Association
-
Returns a tuple of all the values in this association.
- values() - Static method in enum class sprouts.From
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class sprouts.SequenceChange
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class sprouts.SingleChange
-
Returns an array containing the constants of this enum class, in the order they are declared.
- ValueSet<E> - Interface in sprouts
-
An immutable collection of non-null elements that contains no duplicates, meaning that it can never contain a pair of elements e1 and e2 such that e1.equals(e2).
- valueSetOf(Class<E>) - Method in class sprouts.impl.Sprouts
- valueSetOf(Class<E>) - Method in interface sprouts.impl.SproutsFactory
- valueSetOfLinked(Class<E>) - Method in class sprouts.impl.Sprouts
- valueSetOfLinked(Class<E>) - Method in interface sprouts.impl.SproutsFactory
- valueSetOfSorted(Class<E>) - Method in class sprouts.impl.Sprouts
- valueSetOfSorted(Class<E>) - Method in interface sprouts.impl.SproutsFactory
- valueSetOfSorted(Class<E>, Comparator<E>) - Method in class sprouts.impl.Sprouts
- valueSetOfSorted(Class<E>, Comparator<E>) - Method in interface sprouts.impl.SproutsFactory
- valueType() - Method in interface sprouts.Association
-
Returns the type of the values in this association.
- Var<T> - Interface in sprouts
-
A mutable wrapper for an item which can also be mapped to a weakly referenced
Viewable
to be observed for changes usingAction
s registered through theViewable.onChange(Channel, Action)
method, where theChannel
is used to distinguish between changes from different sources (usually application layers like the view model or the view).
UseVal.view()
to access a simple no-op live view of the item of this property and register change listeners on it to react to state changes. - varOf(Class<T>, V) - Method in class sprouts.impl.Sprouts
- varOf(Class<T>, V) - Method in interface sprouts.impl.SproutsFactory
- varOf(T) - Method in class sprouts.impl.Sprouts
- varOf(T) - Method in interface sprouts.impl.SproutsFactory
- varOfNull(Class<T>) - Method in class sprouts.impl.Sprouts
- varOfNull(Class<T>) - Method in interface sprouts.impl.SproutsFactory
- varOfNullable(Class<T>, T) - Method in class sprouts.impl.Sprouts
- varOfNullable(Class<T>, T) - Method in interface sprouts.impl.SproutsFactory
- Vars<T> - Interface in sprouts
-
A mutable list of mutable properties designed for MVVM, that can be observed for changes through a
Vals.view()
by registeringSubscriber
types on it likeObserver
s andAction
s. - varsOf(Class<T>) - Method in class sprouts.impl.Sprouts
- varsOf(Class<T>) - Method in interface sprouts.impl.SproutsFactory
- varsOf(Class<T>, Iterable<Var<T>>) - Method in class sprouts.impl.Sprouts
- varsOf(Class<T>, Iterable<Var<T>>) - Method in interface sprouts.impl.SproutsFactory
- varsOf(Class<T>, Var<T>...) - Method in class sprouts.impl.Sprouts
- varsOf(Class<T>, Var<T>...) - Method in interface sprouts.impl.SproutsFactory
- varsOf(Class<T>, T...) - Method in class sprouts.impl.Sprouts
- varsOf(Class<T>, T...) - Method in interface sprouts.impl.SproutsFactory
- varsOf(Var<T>, Var<T>...) - Method in class sprouts.impl.Sprouts
- varsOf(Var<T>, Var<T>...) - Method in interface sprouts.impl.SproutsFactory
- varsOf(T, T...) - Method in class sprouts.impl.Sprouts
- varsOf(T, T...) - Method in interface sprouts.impl.SproutsFactory
- varsOfNullable(Class<T>) - Method in class sprouts.impl.Sprouts
- varsOfNullable(Class<T>) - Method in interface sprouts.impl.SproutsFactory
- varsOfNullable(Class<T>, T...) - Method in class sprouts.impl.Sprouts
- varsOfNullable(Class<T>, T...) - Method in interface sprouts.impl.SproutsFactory
- varsOfNullable(Class<T>, Iterable<Var<T>>) - Method in interface sprouts.impl.SproutsFactory
- varsOfNullable(Class<T>, Iterable<Var<T>>) - Method in class sprouts.impl.Sprouts
- varsOfNullable(Class<T>, Var<T>...) - Method in class sprouts.impl.Sprouts
- varsOfNullable(Class<T>, Var<T>...) - Method in interface sprouts.impl.SproutsFactory
- varsOfNullable(Var<T>, Var<T>...) - Method in class sprouts.impl.Sprouts
- varsOfNullable(Var<T>, Var<T>...) - Method in interface sprouts.impl.SproutsFactory
- version() - Method in class sprouts.impl.SequenceDiff
-
The version of the
Tuple
state to which thisSequenceDiff
belongs. - Version - Class in sprouts
-
This is a value object representing a unique ID consisting of two numbers, a lineage and succession, allowing you to identify something and also determine the order in which something was created and updated.
- view() - Method in interface sprouts.Val
-
Returns a no-op
Viewable
of thisVal
to be used for registering change listeners (seeViewable.onChange(Channel, Action)
).
Warning:
If you do not keep a strong reference to theViewable
returned by this method, then it will eventually be garbage collected alongside all of its change listeners.
So if there are changes in this property afterward, the change listeners will not be called! - view() - Method in interface sprouts.Vals
-
Creates a weakly referenced
Viewables
instance from this list of properties, which is functionally equivalent to this list of properties, except that you can register change listeners on it using theonChange(Action)
method.
Warning:
If you have change listeners registered theViewables
instance returned by this method, and you do not hold a reference to it, then it will be garbage collected alongside all of its change listeners.
So if there are changes in this list afterwords, the change listeners will not be called! - view(Function<T, T>) - Method in interface sprouts.Val
-
Use this to create a live view of this property based on a mapping function which maps the item of this property to an item of the same type as this property.
- view(U, Function<T, U>) - Method in interface sprouts.Val
-
Use this to create a live view of this property through a new property based on the provided mapping function.
- view(U, U, Function<T, U>) - Method in interface sprouts.Val
-
Use this to create a live view of this property through a new property based on the provided mapping function.
- view(U, U, Function<T, U>) - Method in interface sprouts.Vals
-
Creates a weakly referenced
Viewables
instance from this list of properties and a dynamic mapper function that maps the items of the properties to another type. - VIEW - Enum constant in enum class sprouts.From
-
This channel is used to identify changes which are caused by the user through the view layer.
- VIEW_MODEL - Enum constant in enum class sprouts.From
-
This channel is used to identify changes which are caused by the view model through the view model layer.
- Viewable<T> - Interface in sprouts
-
A read-only live view on a delegated item which can be observed for changes using
Action
s registered through theViewable.onChange(Channel, Action)
method, where theChannel
is used to distinguish between changes from different sources (usually application layers like the view model or the view). - Viewables<T> - Interface in sprouts
-
A read-only live view on a delegated list of items which can be observed for changes using
Action
s registered through theonChange(Action)
method. - viewAs(Class<U>, Function<T, U>) - Method in interface sprouts.Val
-
Use this to create a live view of this property through a new property based on the provided mapping function.
- viewAsAssociation(Class<K>, Class<V>, Function<T, Association<K, V>>) - Method in interface sprouts.Val
-
Creates a live view of this property as a
Association
containing key-value pairs of the specified key typeK
and value typeV
using the supplied mapping function which dynamically maps the current property itemT
to aAssociation<K, V>
. - viewAsDouble() - Method in interface sprouts.Val
-
Use this to create a
Double
based live view of this property through a new property based on theObject.toString()
andDouble.parseDouble(String)
methods used as the mapping functions. - viewAsDouble(double, Function<T, Double>) - Method in interface sprouts.Val
-
Use this to create a
Double
based live view of this property through a new property based on the provided mapping function and null object. - viewAsDouble(Function<T, Double>) - Method in interface sprouts.Val
-
Use this to create a
Double
based live view of this property through a new property based on the provided mapping function. - viewAsInt() - Method in interface sprouts.Val
-
Use this to create a
Integer
based live view of this property through a new property based on theObject.toString()
andInteger.parseInt(String)
methods used as the mapping functions. - viewAsInt(int, Function<T, Integer>) - Method in interface sprouts.Val
-
Use this to create a
Integer
based live view of this property through a new property based on the provided mapping function and null object. - viewAsInt(Function<T, Integer>) - Method in interface sprouts.Val
-
Use this to create a
Integer
based live view of this property through a new property based on the provided mapping function. - viewAsNullable(Class<U>, Function<T, U>) - Method in interface sprouts.Val
-
Use this to create a nullable live view of this property through a new property based on the provided mapping function.
- viewAsString() - Method in interface sprouts.Val
-
Use this to create a
String
based live view of this property through a new property based on theObject.toString()
method used as the mapping function. - viewAsString(String, Function<T, String>) - Method in interface sprouts.Val
-
Use this to create a
String
based live view of this property through a new property based on the provided mapping function and null object. - viewAsString(Function<T, String>) - Method in interface sprouts.Val
-
Use this to create a
String
based live view of this property through a new property based on the provided mapping function. - viewAsTuple(Class<U>, Function<T, Tuple<U>>) - Method in interface sprouts.Val
-
Creates a live view of this property as a
Tuple
containing items of the specified type using the given mapping function which dynamically maps the current property itemT
to aTuple<U>
. - viewAsValueSet(Class<E>, Function<T, ValueSet<E>>) - Method in interface sprouts.Val
-
Creates a live view of this property as a
ValueSet
containing items of the specified typeE
using the given mapping function which dynamically maps the current property itemT
to aValueSet<E>
. - viewIsEmpty() - Method in interface sprouts.Val
-
Creates and returns a boolean property which is a live view of the
Maybe.isEmpty()
flag of this property.
Warning:
If you do not keep a strong reference to theViewable
returned by this method, then it will eventually be garbage collected alongside all of its change listeners.
So if there are changes in this property afterward, the change listeners will not be called! - viewIsEmpty() - Method in interface sprouts.Vals
-
Exposes a boolean based property that is a live view on the
Vals.isEmpty()
flag of the list of properties. - viewIsNotEmpty() - Method in interface sprouts.Vals
-
Exposes a boolean based property that is a live view on the
Vals.isNotEmpty()
flag of the list of properties. - viewIsPresent() - Method in interface sprouts.Val
-
Creates and returns a boolean property which is a live view of the
Maybe.isPresent()
flag of this property.
Warning:
If you do not keep a strong reference to theViewable
returned by this method, then it will eventually be garbage collected alongside all of its change listeners.
So if there are changes in this property afterward, the change listeners will not be called! - viewOf(Class<R>, Val<T>, Val<U>, BiFunction<T, U, R>) - Method in class sprouts.impl.Sprouts
- viewOf(Class<R>, Val<T>, Val<U>, BiFunction<T, U, R>) - Method in interface sprouts.impl.SproutsFactory
- viewOf(Class<T>, Val<U>, Function<U, T>) - Method in class sprouts.impl.Sprouts
- viewOf(Class<T>, Val<U>, Function<U, T>) - Method in interface sprouts.impl.SproutsFactory
- viewOf(Val<T>) - Method in class sprouts.impl.Sprouts
- viewOf(Val<T>) - Method in interface sprouts.impl.SproutsFactory
- viewOf(Val<T>, Val<U>, BiFunction<T, U, T>) - Method in class sprouts.impl.Sprouts
- viewOf(Val<T>, Val<U>, BiFunction<T, U, T>) - Method in interface sprouts.impl.SproutsFactory
- viewOf(Vals<T>) - Method in class sprouts.impl.Sprouts
- viewOf(Vals<T>) - Method in interface sprouts.impl.SproutsFactory
- viewOf(U, U, Val<T>, Function<T, U>) - Method in class sprouts.impl.Sprouts
- viewOf(U, U, Val<T>, Function<T, U>) - Method in interface sprouts.impl.SproutsFactory
- viewOf(U, U, Vals<T>, Function<T, U>) - Method in class sprouts.impl.Sprouts
- viewOf(U, U, Vals<T>, Function<T, U>) - Method in interface sprouts.impl.SproutsFactory
- viewOfNullable(Class<R>, Val<T>, Val<U>, BiFunction<T, U, R>) - Method in class sprouts.impl.Sprouts
- viewOfNullable(Class<R>, Val<T>, Val<U>, BiFunction<T, U, R>) - Method in interface sprouts.impl.SproutsFactory
- viewOfNullable(Class<U>, Val<T>, Function<T, U>) - Method in class sprouts.impl.Sprouts
- viewOfNullable(Class<U>, Val<T>, Function<T, U>) - Method in interface sprouts.impl.SproutsFactory
- viewOfNullable(Val<T>, Val<U>, BiFunction<T, U, T>) - Method in class sprouts.impl.Sprouts
- viewOfNullable(Val<T>, Val<U>, BiFunction<T, U, T>) - Method in interface sprouts.impl.SproutsFactory
- viewSize() - Method in interface sprouts.Vals
-
Exposes an integer based property that is a live view on the
Vals.size()
of the list of properties.
W
- wither(A, B) - Method in interface sprouts.Lens
-
Produces a new instance of the parent type
A
with one of its fields of typeB
updated with a new value. - withFirst(F) - Method in class sprouts.Pair
-
A wither method allowing you to create an updated pair, where the
Pair.first()
item is changed to the supplied value. - withId(String) - Method in interface sprouts.Val
-
Use this method to create a new property with an id.
- withId(String) - Method in interface sprouts.Var
-
Use this method to create a new property with an id.
- withSecond(S) - Method in class sprouts.Pair
-
A wither method allowing you to create an updated pair, where the
Pair.second()
item is changed to the supplied value.
Z
- zoomTo(B, Function<T, B>, BiFunction<T, B, T>) - Method in interface sprouts.Var
-
Creates a lens property (Var) that focuses on a specific field of the item of this property, allowing a default value for whenever the item of this property is null.
- zoomTo(B, Lens<T, B>) - Method in interface sprouts.Var
-
Creates a lens property (Var) from the supplied
Lens
implementation, which focuses on a specific field of the potentially nullable item of this property, where a default non-null value is provided for cases when the item of this property is null. - zoomTo(Function<T, B>, BiFunction<T, B, T>) - Method in interface sprouts.Var
-
Creates a lens property (Var) that focuses on a specific field on the property item type, using a getter and a wither function to access and update the field.
- zoomTo(Lens<T, B>) - Method in interface sprouts.Var
-
Creates a lens property (Var) that focuses on a specific field of the current property item using a supplied
Lens
implementation. - zoomToNullable(Class<B>, Function<T, B>, BiFunction<T, B, T>) - Method in interface sprouts.Var
-
Creates a nullable lens property (Var) that focuses on a specific nullable field of the current property item.
- zoomToNullable(Class<B>, Lens<T, B>) - Method in interface sprouts.Var
-
Creates a nullable lens property (Var) that focuses on a specific nullable field of the current property item, using a supplied
Lens
implementation.
All Classes and Interfaces|All Packages|Serialized Form