Trait

ars.precondition.require

RequireNumericRange

Related Doc: package require

Permalink

trait RequireNumericRange extends RequireCore

requireXXX methods to test numeric ranges.

Since

0.0.1

Linear Supertypes
RequireCore, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RequireNumericRange
  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. 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 requireNumber[T](value: T, number: T, name: String = NoNameParameter)(implicit arg0: Numeric[T]): Unit

    Permalink

    Test that value is equal to number, and otherwise throws RequireCore.exception().

    Test that value is equal to number, and otherwise throws RequireCore.exception().

    T

    the type of iterable elements

    value

    the value (must be non-null)

    number

    the required number (must be non-null)

    name

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

    Annotations
    @inline()
    Exceptions thrown

    RuntimeException if test fails

  22. def requireNumberFrom[T](value: T, leftBound: BoundedNumber[T], name: String = NoNameParameter)(implicit arg0: Numeric[T]): Unit

    Permalink

    Tests that value is from leftBound until maximum value of type T (inclusive), and otherwise throws RequireCore.exception().

    Tests that value is from leftBound until maximum value of type T (inclusive), and otherwise throws RequireCore.exception().

    T

    the type of value

    value

    the value (must be non-null)

    leftBound

    the left bound (must be non-null)

    name

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

    Annotations
    @inline()
    Exceptions thrown

    RuntimeException if test fails

  23. def requireNumberInRange[T](value: T, leftBound: BoundedNumber[T], rightBound: BoundedNumber[T], name: String = NoNameParameter)(implicit arg0: Numeric[T]): Unit

    Permalink

    Tests that value is from leftBound until rightBound, and otherwise throws RequireCore.exception().

    Tests that value is from leftBound until rightBound, and otherwise throws RequireCore.exception().

    T

    the type of value

    value

    the value (must be non-null)

    leftBound

    the left bound (must be non-null)

    rightBound

    the right bound (must be non-null)

    Annotations
    @inline()
    Exceptions thrown

    RuntimeException if test fails

  24. def requireNumberUntil[T](value: T, rightBound: BoundedNumber[T], name: String = NoNameParameter)(implicit arg0: Numeric[T]): Unit

    Permalink

    Tests that value is from minimum value of type T (inclusive) until rightBound, and otherwise throws RequireCore.exception().

    Tests that value is from minimum value of type T (inclusive) until rightBound, and otherwise throws RequireCore.exception().

    T

    the type of value

    value

    the value (must be non-null)

    rightBound

    the right bound (must be non-null)

    name

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

    Annotations
    @inline()
    Exceptions thrown

    RuntimeException if test fails

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

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

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

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

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

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

Inherited from RequireCore

Inherited from AnyRef

Inherited from Any

Ungrouped