class EventImpl[T] extends Operators.DerivedImpl[T] with Operators.Event[T]
- Grouped
- Alphabetic
- By Inheritance
- EventImpl
- Event
- EventCompat
- ReadableMacro
- MacroAccess
- ReadAs
- DerivedImpl
- DisconnectableImpl
- Disconnectable
- Derived
- Base
- ReSource
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
EventImpl(initial: Operators.State[Pulse[T]], expr: (DynamicTicket) ⇒ Pulse[T], name: ReInfo, isDynamicWithStaticDeps: Option[Set[of[Operators.State]]])
- isDynamicWithStaticDeps
If this is None, the event is static. Else, it is dynamic with the set of static dependencies
Type Members
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final macro
def
&&(expression: (T) ⇒ Boolean)(implicit ticket: CreationTicket): Operators.Event[T]
Filters the event, only propagating the value when the filter is true.
Filters the event, only propagating the value when the filter is true.
- Definition Classes
- EventCompat
- Annotations
- @cutOutOfUserComputation()
- See also
filter
-
final
def
+=(handler: (T) ⇒ Unit)(implicit ticket: CreationTicket): Disconnectable
Adds an observer.
Adds an observer.
- Definition Classes
- Event
- See also
observe
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
\[U](except: Operators.Event[U])(implicit ticket: CreationTicket): Operators.Event[T]
Propagates the event only when except does not fire.
Propagates the event only when except does not fire.
- Definition Classes
- Event
- Annotations
- @cutOutOfUserComputation()
-
final
def
and[U, R](other: Operators.Event[U])(merger: (T, U) ⇒ R)(implicit ticket: CreationTicket): Operators.Event[R]
Merge the event with the other, if both fire simultaneously.
Merge the event with the other, if both fire simultaneously.
- Definition Classes
- Event
- Annotations
- @cutOutOfUserComputation()
-
final
def
apply(): Option[T]
Makes the enclosing reactive expression depend on the current value of the reactive.
Makes the enclosing reactive expression depend on the current value of the reactive. Is an alias for value.
- Definition Classes
- MacroAccess
- Annotations
- @compileTimeOnly( ... )
- See also
value
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final macro
def
collect[U](expression: PartialFunction[T, U])(implicit ticket: CreationTicket): Operators.Event[U]
Collects the results from a partial function
Collects the results from a partial function
- Definition Classes
- EventCompat
- Annotations
- @cutOutOfUserComputation()
- def commit(base: Pulse[T]): Pulse[T]
-
def
computePulse(rein: ReevTicket[State, Pulse[T]]): Pulse[T]
- Attributes
- protected[this]
- Definition Classes
- EventImpl → DerivedImpl
-
final
def
count()(implicit ticket: CreationTicket): Operators.Signal[Int]
Counts the occurrences of the event.
Counts the occurrences of the event. The argument of the event is discarded. Always starts from 0 when the count is created (no matter how often the event has activated in the past).
- Definition Classes
- Event
- Annotations
- @cutOutOfUserComputation()
-
final
def
disconnect(): Unit
- Definition Classes
- DisconnectableImpl → Disconnectable
-
final
def
dropParam(implicit ticket: CreationTicket): Operators.Event[Unit]
Drop the event parameter; equivalent to map((_: Any) => ())
Drop the event parameter; equivalent to map((_: Any) => ())
- Definition Classes
- Event
- Annotations
- @cutOutOfUserComputation()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final macro
def
filter(expression: (T) ⇒ Boolean)(implicit ticket: CreationTicket): Operators.Event[T]
Filters the event, only propagating the value when the filter is true.
Filters the event, only propagating the value when the filter is true.
- Definition Classes
- EventCompat
- Annotations
- @cutOutOfUserComputation()
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
flatten[R](implicit flatten: Operators.Flatten[Operators.Event[T], R]): R
Flattens the inner value.
Flattens the inner value.
- Definition Classes
- Event
- Annotations
- @cutOutOfUserComputation()
-
final macro
def
fold[A](init: A)(op: (A, T) ⇒ A)(implicit ticket: CreationTicket): Operators.Signal[A]
Folds events with a given operation to create a Signal.
Folds events with a given operation to create a Signal.
- Definition Classes
- EventCompat
- Annotations
- @cutOutOfUserComputation()
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
guardedReevaluate(rein: ReIn): Rout
- Attributes
- protected[rescala]
- Definition Classes
- DerivedImpl → DisconnectableImpl
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- val info: ReInfo
- def internalAccess(v: Pulse[T]): Pulse[T]
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
iterate[A](init: A)(f: (A) ⇒ A)(implicit ticket: CreationTicket): Operators.Signal[A]
Applies a function on the current value of the signal every time the event occurs, starting with the init value before the first event occurrence
Applies a function on the current value of the signal every time the event occurs, starting with the init value before the first event occurrence
- Definition Classes
- Event
- Annotations
- @cutOutOfUserComputation()
-
final
def
last[A >: T](n: Int)(implicit ticket: CreationTicket): Operators.Signal[LinearSeq[A]]
Returns a signal which holds the last n events in a list.
Returns a signal which holds the last n events in a list. At the beginning the list increases in size up to when n values are available
- Definition Classes
- Event
- Annotations
- @cutOutOfUserComputation()
-
final
def
latest[A >: T]()(implicit ticket: CreationTicket): Operators.Signal[A]
returns a signal holding the latest value of the event.
returns a signal holding the latest value of the event.
- Definition Classes
- Event
- Annotations
- @cutOutOfUserComputation()
-
final
def
latest[A >: T](init: A)(implicit ticket: CreationTicket): Operators.Signal[A]
returns a signal holding the latest value of the event.
returns a signal holding the latest value of the event.
- init
initial value of the returned signal
- Definition Classes
- Event
- Annotations
- @cutOutOfUserComputation()
-
final
def
latestOption[A >: T]()(implicit ticket: CreationTicket): Operators.Signal[Option[A]]
Holds the latest value of an event as an Option, None before the first event occured
Holds the latest value of an event as an Option, None before the first event occured
- Definition Classes
- Event
- Annotations
- @cutOutOfUserComputation()
-
final
def
list[A >: T]()(implicit ticket: CreationTicket): Operators.Signal[List[A]]
collects events resulting in a variable holding a list of all values.
collects events resulting in a variable holding a list of all values.
- Definition Classes
- Event
- Annotations
- @cutOutOfUserComputation()
-
final macro
def
map[A](expression: (T) ⇒ A)(implicit ticket: CreationTicket): Operators.Event[A]
Transform the event.
Transform the event.
- Definition Classes
- EventCompat
- Annotations
- @cutOutOfUserComputation()
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
observe(onValue: (T) ⇒ Unit, onError: (Throwable) ⇒ Unit = null, fireImmediately: Boolean = false)(implicit ticket: CreationTicket): Disconnectable
Add an observer.
Add an observer.
- returns
the resulting rescala.operator.ObserveBundle.Observe can be used to remove the observer.
- Definition Classes
- Event
-
def
read(v: Value): Option[T]
Interprets the pulse of the event by converting to an option
-
final
def
recover[R >: T](onFailure: PartialFunction[Throwable, Option[R]])(implicit ticket: CreationTicket): Operators.Event[R]
Uses a partial function
onFailureto recover an error carried by the event into a value when returning Some(value), or filters the error when returning NoneUses a partial function
onFailureto recover an error carried by the event into a value when returning Some(value), or filters the error when returning None- Definition Classes
- Event
-
final
def
reduce[A](reducer: (⇒ A, ⇒ T) ⇒ A)(implicit ticket: CreationTicket): Operators.Signal[A]
reduces events with a given reduce function to create a Signal
reduces events with a given reduce function to create a Signal
- Definition Classes
- Event
- Annotations
- @cutOutOfUserComputation()
-
final
def
reevaluate(rein: ReIn): Rout
called if any of the dependencies (rescala.core.Core.ReSources) changed in the current update turn, after all (known) dependencies are updated
called if any of the dependencies (rescala.core.Core.ReSources) changed in the current update turn, after all (known) dependencies are updated
- Attributes
- protected[rescala]
- Definition Classes
- DisconnectableImpl → Derived
-
def
resource: of[State, Option[T]]
- Definition Classes
- Event → MacroAccess
- val state: Operators.State[Pulse[T]]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- Base → AnyRef → Any
-
final
def
toggle[A](a: Operators.Signal[A], b: Operators.Signal[A])(implicit ticket: CreationTicket): Operators.Signal[A]
Switch back and forth between two signals on occurrence of event e
Switch back and forth between two signals on occurrence of event e
- Definition Classes
- Event
- Annotations
- @cutOutOfUserComputation()
-
final
def
value: Option[T]
Makes the enclosing reactive expression depend on the current value of the reactive.
Makes the enclosing reactive expression depend on the current value of the reactive. Is an alias for rescala.macros.MacroAccess.apply.
- Definition Classes
- MacroAccess
- Annotations
- @compileTimeOnly( ... )
- See also
apply
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
zip[U](other: Operators.Event[U])(implicit ticket: CreationTicket): Operators.Event[(T, U)]
Merge the event with the other into a tuple, if both fire simultaneously.
Merge the event with the other into a tuple, if both fire simultaneously.
- Definition Classes
- Event
- Annotations
- @cutOutOfUserComputation()
- See also
and
-
final
def
zipOuter[U](other: Operators.Event[U])(implicit ticket: CreationTicket): Operators.Event[(Option[T], Option[U])]
Merge the event with the other into a tuple, even if only one of them fired.
Merge the event with the other into a tuple, even if only one of them fired.
- Definition Classes
- Event
- Annotations
- @cutOutOfUserComputation()
-
final
def
||[U >: T](other: Operators.Event[U])(implicit ticket: CreationTicket): Operators.Event[U]
Events disjunction.
Events disjunction. Propagates the values if any of the events fires. Only propagates the left event if both fire.
- Definition Classes
- Event
- Annotations
- @cutOutOfUserComputation()