com.github.johnreedlol.conversions

ImplicitAssert

final case class ImplicitAssert[MyType](me: MyType) extends AnyVal with Product with Serializable

Wrapper class for implicit conversion .assert methods

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyVal, NotNull, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ImplicitAssert
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyVal
  7. NotNull
  8. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ImplicitAssert(me: MyType)

Value Members

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

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

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

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

    Definition Classes
    Any
  5. final def assert(assertion: (MyType) ⇒ Boolean, message: String, numLines: Int = Int.MaxValue): MyType

    A fatal assertion, but with the function name after the object.

    A fatal assertion, but with the function name after the object. Terminates the program with exit code "7"

    assertion

    the assertion that must be true for the program to run

    message

    the message to be printed to standard error on assertion failure

    numLines

    the number of lines of stack trace

    Example:
    1. 1.assert( _ + 2 = 3, "Error: one plus two does not equal three.")

    Note

    this (and other assertions not marked "nonFatal") are fatal. To disable, please call "Debug.fatalAssertOffSE()"

  6. final def assertEq[OtherType](other: OtherType, message: String, numLines: Int = Int.MaxValue): MyType

    Compares this object with another object of the same type for equality using the ".

    Compares this object with another object of the same type for equality using the ".equals()" method. Terminates the program with exit code "7" in case of assertion failure

    other

    the thing that this must be equal to

    message

    the message to be printed to standard error on assertion failure

    numLines

    the max number of lines of stack trace to show on assertion failure. Defaults to all lines

    Example:
    1. "foo".assertEquals("bar", "Error: foo does not equal bar")

    Note

    this (and other assertions not marked "nonFatal") are fatal. To disable, please call "Debug.fatalAssertOffSE()"

  7. final def assertEqOut[OtherType](other: OtherType, message: String, numLines: Int = Int.MaxValue): MyType

    Same as ImplicitTrace.

    Same as ImplicitTrace.assertEq(), but it uses StdOut instead of StdErr.

    Note

    this (and other assertions not marked "nonFatal") are fatal. To disable, please call "Debug.fatalAssertOffSE()"

  8. final def assertOut(assertion: (MyType) ⇒ Boolean, message: String, numLines: Int = Int.MaxValue): MyType

    A fatal assertion, but with the function name after the object.

    A fatal assertion, but with the function name after the object. Terminates the program with exit code "7"

    assertion

    the assertion that must be true for the program to run

    message

    the message to be printed to standard out on assertion failure

    numLines

    the number of lines of stack trace

    Example:
    1. 1.assertStdOut( _ + 2 = 3, "Error: one plus two does not equal three.")

    Note

    this (and other assertions not marked "nonFatal") are fatal. To disable, please call "Debug.fatalAssertOffSE()"

  9. final def check(assertion: (MyType) ⇒ Boolean, message: String, numLines: Int = Int.MaxValue): MyType

    Same as ImplicitTrace[MyType].

    Same as ImplicitTrace[MyType].assert(), but it does not kill anything (not even the current thread)

  10. final def checkEq[OtherType](other: OtherType, message: String, numLines: Int = Int.MaxValue): MyType

    Same as ImplicitTrace[MyType].

    Same as ImplicitTrace[MyType].assertEq(), but it does not kill anything (not even the current thread)

  11. final def checkEqOut[OtherType](other: OtherType, message: String, numLines: Int = Int.MaxValue): MyType

    Same as ImplicitTrace[MyType].

    Same as ImplicitTrace[MyType].assertEqOut(), but it does not kill anything (not even the current thread)

  12. final def checkOut(assertion: (MyType) ⇒ Boolean, message: String, numLines: Int = Int.MaxValue): MyType

    Same as ImplicitTrace[MyType].

    Same as ImplicitTrace[MyType].assertOut(), but it does not kill anything (not even the current thread)

  13. def getClass(): Class[_ <: AnyVal]

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

    Definition Classes
    Any
  15. val me: MyType

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyVal

Inherited from NotNull

Inherited from Any

Ungrouped