Trait

rescala.operator.EventBundle

Event

Related Doc: package EventBundle

Permalink

trait Event[+T] extends (EventBundle.this)#ReSource with (EventBundle.this)#EventCompat[T] with (EventBundle.this)#InterpMacro[Option[T]] with (EventBundle.this)#Disconnectable

Events only propagate a value when they are changing, when the system is at rest, events have no values.

Note: We hide implicit parameters of the API in the documentation. They are used to ensure correct creation, and you normally do not have to worry about them, except if you accidentally call the implicit parameter list, in which cas you may get cryptic errors. This is a scala limitation. We also hide the internal state parameter of passed and returned events.

T

Value type of the event occurrences.

Linear Supertypes
(EventBundle.this)#Disconnectable, (EventBundle.this)#EventCompat[T], (EventBundle.this)#InterpMacro[Option[T]], MacroAccess[Option[T], (EventBundle.this)#Interp[Option[T]]], (EventBundle.this)#Interp[Option[T]], (EventBundle.this)#ReSource, AnyRef, Any
Known Subclasses
Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. Event
  2. Disconnectable
  3. EventCompat
  4. InterpMacro
  5. MacroAccess
  6. Interp
  7. ReSource
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. abstract type Value

    Permalink
    Definition Classes
    ReSource

Abstract Value Members

  1. abstract def commit(base: Value): Value

    Permalink
    Attributes
    protected[rescala]
    Definition Classes
    ReSource
  2. abstract def disconnect()(implicit engine: (EventBundle.this)#Scheduler): Unit

    Permalink
    Definition Classes
    Disconnectable
  3. implicit abstract def internalAccess(v: Value): Pulse[T]

    Permalink
  4. abstract def name: ReName

    Permalink
    Attributes
    protected[rescala]
    Definition Classes
    ReSource
  5. abstract def state: (EventBundle.this)#State[Value]

    Permalink
    Attributes
    protected[rescala]
    Definition Classes
    ReSource

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final macro def &&(expression: (T) ⇒ Boolean)(implicit ticket: (EventBundle.this)#CreationTicket): (EventBundle.this)#Event[T]

    Permalink

    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

  4. final def +=(handler: (T) ⇒ Unit)(implicit ticket: (EventBundle.this)#CreationTicket): (EventBundle.this)#Observe

    Permalink

    Adds an observer.

    Adds an observer.

    See also

    observe

  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. final def \[U](except: (EventBundle.this)#Event[U])(implicit ticket: (EventBundle.this)#CreationTicket): (EventBundle.this)#Event[T]

    Permalink

    Propagates the event only when except does not fire.

    Propagates the event only when except does not fire.

    Annotations
    @cutOutOfUserComputation()
  7. final def and[U, R](other: (EventBundle.this)#Event[U])(merger: (T, U) ⇒ R)(implicit ticket: (EventBundle.this)#CreationTicket): (EventBundle.this)#Event[R]

    Permalink

    Merge the event with the other, if both fire simultaneously.

    Merge the event with the other, if both fire simultaneously.

    Annotations
    @cutOutOfUserComputation()
  8. final def apply(): Option[T]

    Permalink

    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

  9. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  10. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @throws( ... )
  11. final macro def collect[U](expression: PartialFunction[T, U])(implicit ticket: (EventBundle.this)#CreationTicket): (EventBundle.this)#Event[U]

    Permalink

    Collects the results from a partial function

    Collects the results from a partial function

    Definition Classes
    EventCompat
    Annotations
    @cutOutOfUserComputation()
  12. final def count()(implicit ticket: (EventBundle.this)#CreationTicket): (EventBundle.this)#Signal[Int]

    Permalink

    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).

    Annotations
    @cutOutOfUserComputation()
  13. final def dropParam(implicit ticket: (EventBundle.this)#CreationTicket): (EventBundle.this)#Event[Unit]

    Permalink

    Drop the event parameter; equivalent to map((_: Any) => ())

    Drop the event parameter; equivalent to map((_: Any) => ())

    Annotations
    @cutOutOfUserComputation()
  14. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  16. final macro def filter(expression: (T) ⇒ Boolean)(implicit ticket: (EventBundle.this)#CreationTicket): (EventBundle.this)#Event[T]

    Permalink

    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()
  17. final def flatten[R](implicit flatten: (EventBundle.this)#Flatten[(EventBundle.this)#Event[T], R]): R

    Permalink

    Flattens the inner value.

    Flattens the inner value.

    Annotations
    @cutOutOfUserComputation()
  18. final macro def fold[A](init: A)(op: (A, T) ⇒ A)(implicit ticket: (EventBundle.this)#CreationTicket): (EventBundle.this)#Signal[A]

    Permalink

    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()
  19. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate()
  20. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate()
  21. def interpret(v: Value): Option[T]

    Permalink

    Interprets the pulse of the event by converting to an option

    Interprets the pulse of the event by converting to an option

    Definition Classes
    EventInterp
  22. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  23. final def iterate[A](init: A)(f: (A) ⇒ A)(implicit ticket: (EventBundle.this)#CreationTicket): (EventBundle.this)#Signal[A]

    Permalink

    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

    Annotations
    @cutOutOfUserComputation()
  24. final def last[A >: T](n: Int)(implicit ticket: (EventBundle.this)#CreationTicket): (EventBundle.this)#Signal[LinearSeq[A]]

    Permalink

    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

    Annotations
    @cutOutOfUserComputation()
  25. final def latest[A >: T]()(implicit ticket: (EventBundle.this)#CreationTicket): (EventBundle.this)#Signal[A]

    Permalink

    returns a signal holding the latest value of the event.

    returns a signal holding the latest value of the event.

    Annotations
    @cutOutOfUserComputation()
  26. final def latest[A >: T](init: A)(implicit ticket: (EventBundle.this)#CreationTicket): (EventBundle.this)#Signal[A]

    Permalink

    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

    Annotations
    @cutOutOfUserComputation()
  27. final def latestOption[A >: T]()(implicit ticket: (EventBundle.this)#CreationTicket): (EventBundle.this)#Signal[Option[A]]

    Permalink

    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

    Annotations
    @cutOutOfUserComputation()
  28. final def list[A >: T]()(implicit ticket: (EventBundle.this)#CreationTicket): (EventBundle.this)#Signal[List[A]]

    Permalink

    collects events resulting in a variable holding a list of all values.

    collects events resulting in a variable holding a list of all values.

    Annotations
    @cutOutOfUserComputation()
  29. final macro def map[A](expression: (T) ⇒ A)(implicit ticket: (EventBundle.this)#CreationTicket): (EventBundle.this)#Event[A]

    Permalink

    Transform the event.

    Transform the event.

    Definition Classes
    EventCompat
    Annotations
    @cutOutOfUserComputation()
  30. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  31. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate()
  32. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate()
  33. final def observe(onValue: (T) ⇒ Unit, onError: (Throwable) ⇒ Unit = null, fireImmediately: Boolean = false)(implicit ticket: (EventBundle.this)#CreationTicket): (EventBundle.this)#Observe

    Permalink

    Add an observer.

    Add an observer.

    returns

    the resulting rescala.operator.Observing.Observe can be used to remove the observer.

  34. final def recover[R >: T](onFailure: PartialFunction[Throwable, Option[R]])(implicit ticket: (EventBundle.this)#CreationTicket): (EventBundle.this)#Event[R]

    Permalink

    Uses a partial function onFailure to recover an error carried by the event into a value when returning Some(value), or filters the error when returning None

  35. final def reduce[A](reducer: (⇒ A, ⇒ T) ⇒ A)(implicit ticket: (EventBundle.this)#CreationTicket): (EventBundle.this)#Signal[A]

    Permalink

    reduces events with a given reduce function to create a Signal

    reduces events with a given reduce function to create a Signal

    Annotations
    @cutOutOfUserComputation()
  36. def resource: (EventBundle.this)#Interp[Option[T]]

    Permalink
    Definition Classes
    EventMacroAccess
  37. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  38. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  39. final def toggle[A](a: (EventBundle.this)#Signal[A], b: (EventBundle.this)#Signal[A])(implicit ticket: (EventBundle.this)#CreationTicket): (EventBundle.this)#Signal[A]

    Permalink

    Switch back and forth between two signals on occurrence of event e

    Switch back and forth between two signals on occurrence of event e

    Annotations
    @cutOutOfUserComputation()
  40. final def value: Option[T]

    Permalink

    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

  41. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  43. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  44. final def zip[U](other: (EventBundle.this)#Event[U])(implicit ticket: (EventBundle.this)#CreationTicket): (EventBundle.this)#Event[(T, U)]

    Permalink

    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.

    Annotations
    @cutOutOfUserComputation()
    See also

    and

  45. final def zipOuter[U](other: (EventBundle.this)#Event[U])(implicit ticket: (EventBundle.this)#CreationTicket): (EventBundle.this)#Event[(Option[T], Option[U])]

    Permalink

    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.

    Annotations
    @cutOutOfUserComputation()
  46. final def ||[U >: T](other: (EventBundle.this)#Event[U])(implicit ticket: (EventBundle.this)#CreationTicket): (EventBundle.this)#Event[U]

    Permalink

    Events disjunction.

    Events disjunction. Propagates the values if any of the events fires. Only propagates the left event if both fire.

    Annotations
    @cutOutOfUserComputation()

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from (EventBundle.this)#Disconnectable

Inherited from (EventBundle.this)#EventCompat[T]

Inherited from (EventBundle.this)#InterpMacro[Option[T]]

Inherited from MacroAccess[Option[T], (EventBundle.this)#Interp[Option[T]]]

Inherited from (EventBundle.this)#Interp[Option[T]]

Inherited from (EventBundle.this)#ReSource

Inherited from AnyRef

Inherited from Any

internal

Accessor and observers

Event operators

Event to Signal conversions

Ungrouped