Channel is the most simplistic representation of an Observable
providing simple methods to set a value to be fired
on attached listeners without retaining state.
Channel is the most simplistic representation of an Observable
providing simple methods to set a value to be fired
on attached listeners without retaining state.
the type of value this channel receives
Dep is very much like a Val
, but is also a Channel
.
Dep is very much like a Val
, but is also a Channel
. The basic purpose is to represent a value dependent upon
another variable. An example of this might be if you are representing a position left
and you also wanted to
represent right
as well (which would be left
+ width
). These two variables are dependent upon each other and
don't fit well as Var
s. An example usage might be:
val left: Var[Double] = Var(0.0)
val width: Var[Double] = Var(0.0)
val right: Dep[Double, Double] = Dep(left, width)
If an instance is submissive
it removes adjustment
from being part of the mutation dependency. For example: in
the above scenario if you set width
to 100.0 and right
to 125.0 then left
will be 25.0. Now, what should happen
if you change width
to 50.0? Should left
change to 75.0 (submissive = false
) or should right
change to 75.0
(submissive = true
)?
MonitoringState is a convenience wrapper around State
providing functionality to monitor Observables
relating
to the value from a function.
MonitoringState is a convenience wrapper around State
providing functionality to monitor Observables
relating
to the value from a function.
the type of value retained by this State
StateChannelContext is used internally by MonitoringState
to track the Observables
during assignment of a value
function.
Val, as the name suggests, is like a Scala val
.
Val, as the name suggests, is like a Scala val
. This represents an immutable value that is set in the first place
and then not modified. However, since the value set may be built from Observables
, the generated value may change
over time as its dependencies are modified. This class is Observable
and will only fire changes if the underlying
value is derived from one or more Observables
.
the type of value retained by this State
Var, as the name suggests, is very similar to a Scala var
.
Var, as the name suggests, is very similar to a Scala var
. The value is defined during instantiation, but may be
modified later. The value may be a static value, or may be a derived value depending on multiple Observables
. If
Observables
make up the value they will be monitored and events fired on this Observable
as the value changes.
the type of value this channel receives
Converts a State[T]
to T
implicitly.
Converts a State[T]
to T
implicitly. This is useful for DSL type-based operations like 5 + stateVar
.