All Classes and Interfaces
Class
Description
A functional interface for observing state changes
and performing some action in response.
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.
This is a marker interface for property event channels.
An event is something that can be triggered and reacted to, through
Observable
s
created by the Event.observable()
method.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 the HasId.id()
method
as a unique identifier for its item when determining the ValDelegate.change()
type.The
Lens
interface defines an access and update operation on an individual part of a nested and immutable
data structure.The
Maybe
interface represents a thing of a specific Maybe.type()
which may or may not exist, and it serves as a null
safe
blue-print for nomadic types like the Result
type.A non-checked runtime exception thrown when an item is missing from a
Maybe
object.This represents an event that can be observed but not triggered.
An observer is a callback function stored inside a
So if you want to observe an event or properties using an observer, then you have to create
Viewable
, Viewables
or more generally
Observable
, and it is typically invoked when
an Event
is triggered, or a property, like
Val
, Var
, Vals
or Vars
,
experienced a state change.So if you want to observe an event or properties using an observer, then you have to create
Observable
"views" using the
following methods, among others:
Event.observable()
Val.view()
Val.view()
Vals.view()
Vals.view()
An immutable value object representing a pair
of two generic values.
A problem is a wrapper for information describing an issue
that can be reported and attached to a
Result
.This class is technically an internal class and should not be used directly.
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.
This class is technically an internal class and should not be used directly.
Supplier of a
This is a functional interface only intended to be used for the result pattern.
Result
's item, which may throw a RuntimeException
or
checked Exception
when used to supply a result item during an invocation
of the Result.ofTry(Class, ResultItemSupplier)
factory method.This is a functional interface only intended to be used for the result pattern.
Similar to
ResultItemSupplier
, but used for running an operation
that does not return a value.Describes how a
Vars
instance was mutated.A
SequenceDiff
object holds meta information about a Tuple
instance
that describes how the Tuple
was transformed from its previous state.This interface is a sort of marker interface for
Tuple
implementations that can provide a SequenceDiff
object that
describes the difference between the current tuple and a previous one (if any),
in terms of a SequenceChange
, the index of the change, and the number of changes.A set of constants that describe how a property item has changed.
Creates instances of the various types of the Sprouts library, like its
persistent data structures (see
This interface allows you to plug in your own implementations of the Sprouts properties and collections, through the
Tuple
, Association
, ValueSet
)
or reactive properties (Val
, Var
, Vals
, Vars
).This interface allows you to plug in your own implementations of the Sprouts properties and collections, through the
Sprouts.setFactory(SproutsFactory)
method.A subscriber may either be an
A subscriber is specifically designed to be stored in a
This interface does not have any methods and is only used for type checking or to remove any kind of change listener from an observable, through
Observer
or an Action
and it is used as a marker interface to allow for both types to be
identified, grouped and used interchangeably.A subscriber is specifically designed to be stored in a
Viewable
,
Viewables
or more generally Observable
, typically to serve
as a simple change listener.This interface does not have any methods and is only used for type checking or to remove any kind of change listener from an observable, through
Observable.unsubscribe(Subscriber)
!An immutable collection of ordered items of the same type
This class can be thought of as an immutable array with an API designed for functional programming and robust handling of
T
(see Tuple.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 of
null
values.A read only wrapper around an item which can be mapped to a weakly referenced
Use
Viewable
to then be observed for changes using Action
s registered through the
Viewable.onChange(Channel, Action)
method,
where the Channel
is used to distinguish between changes from
different sources (usually application layers like the view model or the view).Use
Val.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.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.
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).
A mutable wrapper for an item which can also be mapped to a weakly referenced
Use
Viewable
to
be observed for changes using Action
s registered through the Viewable.onChange(Channel, Action)
method,
where the Channel
is used to distinguish between changes from
different sources (usually application layers like the view model or the view).Use
Val.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.A mutable list of mutable properties designed for MVVM, that can be observed for changes
through a
Vals.view()
by registering Subscriber
types on it like
Observer
s and Action
s.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.
A read-only live view on a delegated item derived from a
Var
or Val
, which
can be observed for changes using Action
s registered through the
Viewable.onChange(Channel, Action)
method, where the Channel
is used to distinguish
between changes from different sources (usually application layers like the view model or the view).A read-only live view on a delegated list of items derived from a
Vars
or Vals
,
which can be observed for changes using Action
s registered through the onChange(Action)
method.