Required

zio.temporal.state.ZWorkflowState$.Required
final case class Required[A] extends ZWorkflowState[A]

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

override def exists(p: A => Boolean): Boolean

Returns true if this State is initialized '''and''' the predicate $p returns true when applied to this state value. Otherwise, returns false.

Returns true if this State is initialized '''and''' the predicate $p returns true when applied to this state value. Otherwise, returns false.

Attributes

p

the predicate to test

Definition Classes
override def forall(p: A => Boolean): Boolean

Returns true if this state is uninitialized '''or''' the predicate p returns true when applied to this state value.

Returns true if this state is uninitialized '''or''' the predicate p returns true when applied to this state value.

Attributes

p

the predicate to test

Definition Classes
override def setTo(value: A): Required.this.type

Replaces the state value

Replaces the state value

Attributes

value

new state value

Returns:

this state updated

Definition Classes
override def snapshotOrElse(default: => A): A

Takes a snapshot of the state or returns the provided default value

Takes a snapshot of the state or returns the provided default value

Attributes

default

the default value

Returns:

the state or default value

Definition Classes
override def toEither[E](left: => E): Either[E, A]

Converts this state to Either

Converts this state to Either

Attributes

E

error type

left

error value which will be used when state is not initialized

Returns:

the state value or Left

Definition Classes
override def toOption: Option[A]

Converts this state to Option

Converts this state to Option

Attributes

Returns:

the state value or None

Definition Classes
override def update(f: A => A): Required.this.type

Updates the state value

Updates the state value

Attributes

f

updating function

Returns:

this state updated

Definition Classes
override def updateWhen(pf: PartialFunction[A, A]): Required.this.type

Updates the state when partial function matches

Updates the state when partial function matches

Attributes

pf

updating function

Returns:

this state updated

Definition Classes

Inherited methods

def :=(value: A): ZWorkflowState.this.type

Replaces the state value

Replaces the state value

Attributes

value

new state value

Returns:

this state updated

Inherited from:
ZWorkflowState
def =!=(that: A): Boolean

Returns true if this State is initialized '''and''' the equals to the provided value. Otherwise, returns false.

Returns true if this State is initialized '''and''' the equals to the provided value. Otherwise, returns false.

Attributes

that

value to check with

Returns:

whenever they're equal

Inherited from:
ZWorkflowState
def =:=(that: A): Boolean

Returns true if this State is initialized '''and''' the equals to the provided value. Otherwise, returns false.

Returns true if this State is initialized '''and''' the equals to the provided value. Otherwise, returns false.

Attributes

that

value to check with

Returns:

whenever they're equal

Inherited from:
ZWorkflowState
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
def setToIf(p: Boolean)(value: => A): ZWorkflowState.this.type

Updates the state when the predicate holds

Updates the state when the predicate holds

Attributes

p

the condition

value

possible new state value

Returns:

this state updated

Inherited from:
ZWorkflowState
def setToUnless(p: Boolean)(value: => A): ZWorkflowState.this.type

Updates the state unless the predicate holds

Updates the state unless the predicate holds

Attributes

p

the condition

value

possible new state value

Returns:

this state updated

Inherited from:
ZWorkflowState
def snapshot: A

Takes a snapshot of the state or throws an error

Takes a snapshot of the state or throws an error

Attributes

Returns:

the state value

Inherited from:
ZWorkflowState
def snapshotOf[B](f: A => B): B

Takes a snapshot of the state applying a function to it ors throw an error

Takes a snapshot of the state applying a function to it ors throw an error

Attributes

f

arbitrary function

Returns:

the result of function application on this state

Inherited from:
ZWorkflowState
def updateIf(p: Boolean)(f: A => A): ZWorkflowState.this.type

Updates the state when the predicate holds

Updates the state when the predicate holds

Attributes

f

updating function

p

the condition

Returns:

this state updated

Inherited from:
ZWorkflowState
def updateUnless(p: Boolean)(f: A => A): ZWorkflowState.this.type

Updates the state unless the predicate holds

Updates the state unless the predicate holds

Attributes

f

updating function

p

the condition

Returns:

this state updated

Inherited from:
ZWorkflowState