Trait

ars.precondition.require

RequireAllSpecific

Related Doc: package require

Permalink

trait RequireAllSpecific extends RequireAll with RequireAny with RequireString

requireXXX methods to test specific property for all elements of iterable.

Since

0.0.4

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RequireAllSpecific
  2. RequireString
  3. RequireAny
  4. RequireAll
  5. RequireCore
  6. AnyRef
  7. 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. 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
  19. 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
  20. 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

  21. def requireAll[T](value: Iterable[T], name: String = NoNameParameter)(require: RequireElementFunction[T]): Unit

    Permalink

    Calls require for all elements of iterable value.

    Calls require for all elements of iterable value. The require must test the element and throws RequireCore.exception() if it's not satisfy the requirements.

    T

    the type of iterable elements

    value

    the iterable value (must be non-null)

    name

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

    require

    the test function (must be non-null)

    Definition Classes
    RequireAll
    Exceptions thrown

    RuntimeException if test fails

  22. def requireAllNotBlank(value: Iterable[String], name: String = NoNameParameter): Unit

    Permalink

    Tests that iterable value does not contain blank (null or empty) strings, and otherwise throws RequireCore.exception().

    Tests that iterable value does not contain blank (null or empty) strings, and otherwise throws RequireCore.exception().

    value

    the iterable value (must be non-null)

    name

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

    Annotations
    @inline()
  23. def requireAllNotNull[T](value: Iterable[T], name: String = NoNameParameter): Unit

    Permalink

    Tests that iterable value does not contain null values, and otherwise throws RequireCore.exception().

    Tests that iterable value does not contain null values, and otherwise throws RequireCore.exception().

    T

    the type of iterable elements

    value

    the iterable value (must be non-null)

    name

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

    Annotations
    @inline()
  24. def requireAllPredicate[T](value: Iterable[T], name: String = NoNameParameter)(predicate: RequirePredicate[T]): Unit

    Permalink

    Calls predicate for all elements of iterable value.

    Calls predicate for all elements of iterable value. It throws RequireCore.exception() if there's an element that does not satisfy the requirements.

    T

    the type of iterable elements

    value

    the iterable value (must be non-null)

    name

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

    predicate

    the predicate (must be non-null)

    Definition Classes
    RequireAll
    Exceptions thrown

    RuntimeException if test fails

  25. def requireNotBlank(value: String, name: String = NoNameParameter): Unit

    Permalink

    Tests that value isn't null or empty (after trim), and otherwise throws RequireCore.exception().

    Tests that value isn't null or empty (after trim), and otherwise throws RequireCore.exception().

    value

    the value to test (must be non-null)

    name

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

    Definition Classes
    RequireString
    Exceptions thrown

    RuntimeException if test fails

  26. def requireNotNull(value: Any, name: String = NoNameParameter): Unit

    Permalink

    Tests that value isn't null, and otherwise throws RequireCore.exception().

    Tests that value isn't null, and otherwise throws RequireCore.exception().

    value

    the value to test

    name

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

    Definition Classes
    RequireAny
  27. def requirePattern(value: String, pattern: Regex, name: String = NoNameParameter): Unit

    Permalink

    Tests that value matches regular expression pattern, and otherwise throws RequireCore.exception().

    Tests that value matches regular expression pattern, and otherwise throws RequireCore.exception().

    value

    the value to test (must be non-null)

    pattern

    the pattern to test (must be non-null)

    name

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

    Definition Classes
    RequireString
    Exceptions thrown

    RuntimeException if test fails

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

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

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

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

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

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

Inherited from RequireString

Inherited from RequireAny

Inherited from RequireAll

Inherited from RequireCore

Inherited from AnyRef

Inherited from Any

Ungrouped