DecisionConstructors

edomata.core.DecisionConstructors
sealed trait DecisionConstructors

Attributes

Source
Decision.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Decision.type

Members list

Value members

Concrete methods

def accept[E](ev: E, evs: E*): Decision[Nothing, E, Unit]

Constructs a program that decides to accept a sequence of events

Constructs a program that decides to accept a sequence of events

Attributes

Source
Decision.scala
def acceptReturn[E, T](t: T)(ev: E, evs: E*): Decision[Nothing, E, T]

Constructs a program that decides to accept a sequence of events and also returns an output

Constructs a program that decides to accept a sequence of events and also returns an output

Attributes

Source
Decision.scala
def acceptWhen[E](predicate: => Boolean)(ev: E, evs: E*): Decision[Nothing, E, Unit]

Constructs a program that decides to accept a sequence of events or do nothing based on a boolean predicate

Constructs a program that decides to accept a sequence of events or do nothing based on a boolean predicate

Attributes

Source
Decision.scala
def acceptWhen[E](ev: Option[E]): Decision[Nothing, E, Unit]

Constructs a program that decides to accept an optional single event or do nothing

Constructs a program that decides to accept an optional single event or do nothing

Attributes

Source
Decision.scala
def acceptWhen[R, E](ev: Option[E])(orElse: R, other: R*): Decision[R, E, Unit]

Constructs a program that decides to accept an optional single event or reject otherwise

Constructs a program that decides to accept an optional single event or reject otherwise

Attributes

Source
Decision.scala
def acceptWhen[R, E](eit: Either[R, E]): Decision[R, E, Unit]

Constructs a program that decides to accept an optional single event or reject otherwise

Constructs a program that decides to accept an optional single event or reject otherwise

Attributes

Source
Decision.scala
def acceptWhen[R, E](eit: EitherNec[R, E]): Decision[R, E, Unit]

Constructs a program that decides to accept an optional single event or reject otherwise

Constructs a program that decides to accept an optional single event or reject otherwise

Attributes

Source
Decision.scala
def apply[T](t: T): Decision[Nothing, Nothing, T]

Constructs a program that outputs a pure value

Constructs a program that outputs a pure value

Attributes

Source
Decision.scala
def fromEither[R, T](eit: Either[R, T]): Decision[R, Nothing, T]

Constructs a program that either outputs a value or rejects

Constructs a program that either outputs a value or rejects

Attributes

Source
Decision.scala
def fromEitherNec[R, T](eit: EitherNec[R, T]): Decision[R, Nothing, T]

Constructs a program that either outputs a value or rejects

Constructs a program that either outputs a value or rejects

You can also use .toDecision syntax for more convenience.

Attributes

Source
Decision.scala
def fromOption[R, T](opt: Option[T], orElse: R, other: R*): Decision[R, Nothing, T]

Constructs a program from an optional value, that outputs value if exists or rejects otherwise

Constructs a program from an optional value, that outputs value if exists or rejects otherwise

You can also use .toDecision syntax for more convenience

Attributes

Source
Decision.scala
def pure[T](t: T): Decision[Nothing, Nothing, T]

Constructs a program that outputs a pure value

Constructs a program that outputs a pure value

Attributes

Source
Decision.scala
def reject[R, E](reason: R, otherReasons: R*): Decision[R, E, Nothing]

Constructs a program that decides to reject with a sequence of reasons

Constructs a program that decides to reject with a sequence of reasons

Attributes

Source
Decision.scala
def rejectWhen[R](predicate: => Boolean)(ev: R, evs: R*): Decision[R, Nothing, Unit]

Constructs a program that decides to reject with a sequence of reasons if a predicate satisfies

Constructs a program that decides to reject with a sequence of reasons if a predicate satisfies

Attributes

Source
Decision.scala
def rejectWhen[R](ev: Option[R]): Decision[R, Nothing, Unit]

Constructs a program that decides to reject with an optional single reason or do nothing otherwise

Constructs a program that decides to reject with an optional single reason or do nothing otherwise

Attributes

Source
Decision.scala
def unit: Decision[Nothing, Nothing, Unit]

Constructs a program that outputs a trivial output

Constructs a program that outputs a trivial output

Attributes

Source
Decision.scala
def validate[R, T](validation: ValidatedNec[R, T]): Decision[R, Nothing, T]

Constructs a program that uses a validation to decide whether to output a value or reject with error(s)

Constructs a program that uses a validation to decide whether to output a value or reject with error(s)

You can also use .toDecision syntax for more convenience

Attributes

Source
Decision.scala