Trait

ars.precondition.require

RequireOptional

Related Doc: package require

Permalink

trait RequireOptional extends RequireCore

requireXXX methods for optional test.

Since

0.0.4

Linear Supertypes
RequireCore, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RequireOptional
  2. RequireCore
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def exception(message: String, cause: Option[RuntimeException] = None): RuntimeException

    Permalink

    Creates a new instance of exception.

    Creates a new instance of exception. Default implementation uses RequireCore.DefaultExceptionCreator exception creator.

    message

    the message (must be non-blank)

    cause

    the cause exception (must be non-null and not Some(null))

    returns

    new exception instance (non-null)

    Definition Classes
    RequireCore
    Exceptions thrown

    RuntimeException if any argument is not valid

  9. def fail(message: ⇒ Any, throwable: Option[RuntimeException] = None): Unit

    Permalink

    Fails test.

    Fails test. Must be invoked at every time when requireXXX method fails. Default implementation invokes exception() to create new exception instance with message produced by failureMessage() method and throws the result.

    message

    the String to include in the failure message (must be non-null)

    Definition Classes
    RequireCore
    Exceptions thrown

    RuntimeException at every invokation

  10. def failureMessage[T](message: ⇒ T): String

    Permalink

    Constructs the failure message.

    Constructs the failure message. Default implementation invokes toString() method of message and returns result.

    message

    the source message (must be non-null)

    returns

    the failure message (non-null)

    Definition Classes
    RequireCore
    Exceptions thrown

    RuntimeException if message is null

  11. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  13. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  16. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. def optional[T](value: Option[T], name: String = NoNameParameter)(require: RequireFunction[T]): Unit

    Permalink

    Invokes require function if value is Some(_) and do nothing otherwise.

    Invokes require function if value is Some(_) and do nothing otherwise.

    T

    the type of value

    value

    the value (must be non-null)

    require

    the function (must be non-null)

    Annotations
    @inline()
  19. def optionalPredicate[T](value: Option[T], name: String = NoNameParameter)(predicate: RequirePredicate[T]): Unit

    Permalink
    Annotations
    @inline()
  20. implicit def pred2elem[T](predicate: RequirePredicate[T]): RequireElementFunction[T]

    Permalink

    Wraps predicate RequirePredicate to element function RequireElementFunction.

    Wraps predicate RequirePredicate to element function RequireElementFunction.

    T

    the type of element

    predicate

    the predicate (must be non-null)

    returns

    the new RequireElementFunction instance

    Definition Classes
    RequireCore
  21. implicit def pred2func[T](predicate: RequirePredicate[T]): RequireFunction[T]

    Permalink

    Wraps predicate RequirePredicate to element function RequireFunction.

    Wraps predicate RequirePredicate to element function RequireFunction.

    T

    the type of element

    predicate

    the predicate (must be non-null)

    returns

    the new RequireFunction instance

    Definition Classes
    RequireCore
  22. def require[T](requirement: ⇒ Boolean, message: ⇒ T): Unit

    Permalink

    Invokes requirement to test an expression and calls fail if it returns false.

    Invokes requirement to test an expression and calls fail if it returns false.

    requirement

    the expression to test

    message

    a String to include in the failure message (must be non-null)

    Definition Classes
    RequireCore
    Exceptions thrown

    RuntimeException if requirement invokation returns false of any argument is not valid

  23. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  24. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  25. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from RequireCore

Inherited from AnyRef

Inherited from Any

Ungrouped