ConditionResult

sealed interface ConditionResult(source)

Represents the result of evaluating a specific condition in a system or workflow. This sealed interface allows for expressing various outcomes of a condition check.

Implementations:

  • Approve: Indicates that the condition was approved.

  • Reject: Indicates that the condition was rejected, optionally with feedback.

Inheritors

Types

Link copied to clipboard

Object representing an approved condition result.

Link copied to clipboard
class Reject(val feedback: String? = null) : ConditionResult

Represents a condition result indicating rejection, optionally with feedback.

Properties

Link copied to clipboard
open val isSuccess: Boolean

Indicates whether the current instance of ConditionResult represents a successful state. Returns true if the instance is of type Approve, signifying success. Otherwise, returns false.