object ValidationResult
- Annotations
- @deprecated
- Deprecated
(Since version 2021-03-25) Use com.twitter.util.validation.MethodValidationResult
- Alphabetic
- By Inheritance
- ValidationResult
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
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( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- 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
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
Deprecated Value Members
-
def
validate(condition: ⇒ Boolean, message: ⇒ String, code: ErrorCode = ErrorCode.Unknown): 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 tofalseor throws an exception a MethodValidationResult.Invalid will be returned. In the case of an exception, theexception.getMessageis 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.- code
ErrorCode to use for when the given condition is
false.- returns
a MethodValidationResult.Valid when the condition is
trueotherwise a MethodValidationResult.Invalid.
- Annotations
- @deprecated
- Deprecated
(Since version 2021-03-25) Use com.twitter.util.validation.MethodValidationResult#validIfTrue
- 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.
-
def
validateNot(condition: ⇒ Boolean, message: ⇒ String, code: ErrorCode = ErrorCode.Unknown): 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 totrueor throws an exception a MethodValidationResult.Invalid will be returned. In the case of an exception, theexception.getMessageis 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.- code
ErrorCode to use for when the given condition is
true.- returns
a MethodValidationResult.Valid when the condition is
falseor when the condition evaluation throws a NonFatal exception otherwise a MethodValidationResult.Invalid.
- Annotations
- @deprecated
- Deprecated
(Since version 2021-03-25) Use com.twitter.util.validation.MethodValidationResult#validIfFalse
- 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.
-
object
Invalid
- Annotations
- @deprecated
- Deprecated
(Since version 2021-03-25) Use com.twitter.util.validation.MethodValidationResult
-
object
Valid
- Annotations
- @deprecated
- Deprecated
(Since version 2021-03-25) Use com.twitter.util.validation.MethodValidationResult