Change

sealed
trait Change[+P] extends Pulse[P]
trait Pulse[P]
class Object
trait Matchable
class Any
class Value[P]

Value members

Inherited methods

def collect[U](pf: PartialFunction[P, U]): Pulse[U]
Inherited from
Pulse
def filter(p: P => Boolean): Pulse[P]

If the pulse indicates a change: Applies a filter function to the updated value of the pulse. Based on the filter function, the updated value is retained or an empty pulse is returned. If the pulse doesn't indicate a change: Returns an empty pulse indicating no change.

If the pulse indicates a change: Applies a filter function to the updated value of the pulse. Based on the filter function, the updated value is retained or an empty pulse is returned. If the pulse doesn't indicate a change: Returns an empty pulse indicating no change.

Value Params
p

Filter function to be applied to the updated pulse value

Returns

A pulse with the updated pulse value if the filter function returns true, an empty pulse otherwise

Inherited from
Pulse
def flatMap[Q](f: P => Pulse[Q]): Pulse[Q]

If the pulse indicates a change: Applies a function to the updated value. The function has to return a new pulse that is returned by this function. If the pulse doesn't indicate a change: Returns an empty pulse indicating no change.

If the pulse indicates a change: Applies a function to the updated value. The function has to return a new pulse that is returned by this function. If the pulse doesn't indicate a change: Returns an empty pulse indicating no change.

Type Params
Q

Value type of the pulse returned by the applied function

Value Params
f

Function to be applied on the updated pulse value

Returns

Pulse returned by the applied function or an empty pulse if there is no updated value

Inherited from
Pulse
def get: P
Inherited from
Pulse
def getOrElse[U >: P](default: U): U
Inherited from
Pulse
final
def isChange: Boolean

Checks if the pulse indicates a change

Checks if the pulse indicates a change

Returns

True if the pulse indicates a change, false if not

Inherited from
Pulse
def map[Q](f: P => Q): Pulse[Q]

If the pulse indicates a change: Applies a function to the updated value of the pulse and returns a new pulse indicating a change to this updated value. If the pulse doesn't indicate a change: Returns an empty pulse indicating no change.

If the pulse indicates a change: Applies a function to the updated value of the pulse and returns a new pulse indicating a change to this updated value. If the pulse doesn't indicate a change: Returns an empty pulse indicating no change.

Type Params
Q

Result type of the applied function

Value Params
f

Function to be applied on the updated pulse value

Returns

Pulse indicating the update performed by the applied function or an empty pulse if there is no updated value

Inherited from
Pulse
def toOption: Option[P]
Inherited from
Pulse
def toOptionTry: Option[Try[P]]

converts the pulse to an option of try

converts the pulse to an option of try

Inherited from
Pulse