object MethodValidationResult
- Alphabetic
- By Inheritance
- MethodValidationResult
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- case class Invalid(message: String, payload: Option[Payload] = None) extends MethodValidationResult with Product with Serializable
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def validIfFalse(condition: => Boolean, message: => String, payload: Option[Payload] = None): MethodValidationResult
Utility for evaluating the negation of a condition in order to return a MethodValidationResult.
Utility for evaluating the negation of a condition in order to return a MethodValidationResult. Returns MethodValidationResult.Valid when the condition is
false
, otherwise if the condition evaluates totrue
or throws an exception a MethodValidationResult.Invalid will be returned. In the case of an exception, theexception.getMessage
is used in place of the given message.- condition
function to evaluate for validation.
- message
function to evaluate for a message when the given condition is
true
.- payload
Payload to use for when the given condition is
true
.- returns
a MethodValidationResult.Valid when the condition is
false
or when the condition evaluation throws a NonFatal exception otherwise a MethodValidationResult.Invalid.
- Note
This will not allow a non-fatal exception to escape. Instead a MethodValidationResult.Valid will be returned when a non-fatal exception is encountered when evaluating
condition
. As this equates failure to execute the condition to a return offalse
.
- def validIfTrue(condition: => Boolean, message: => String, payload: Option[Payload] = None): MethodValidationResult
Utility for evaluating a condition in order to return a MethodValidationResult.
Utility for evaluating a condition in order to return a MethodValidationResult. Returns MethodValidationResult.Valid when the condition is
true
, otherwise if the condition evaluates tofalse
or throws an exception a MethodValidationResult.Invalid will be returned. In the case of an exception, theexception.getMessage
is used in place of the given message.- condition
function to evaluate for validation.
- message
function to evaluate for a message when the given condition is
false
.- payload
Payload to use for when the given condition is
false
.- returns
a MethodValidationResult.Valid when the condition is
true
otherwise a MethodValidationResult.Invalid.
- Note
This will not allow a non-fatal exception to escape. Instead a MethodValidationResult.Invalid will be returned when a non-fatal exception is encountered when evaluating
condition
. As this equates failure to execute the condition function to a return offalse
.
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- case object EmptyPayload extends Payload with Product with Serializable
- case object Valid extends MethodValidationResult with Product with Serializable