scala.slick.collection.heterogenous

Nat

abstract class Nat extends AnyRef

Natural numbers for indexing in HLists.

All type-level computations are done with Church Numerals. Value-level computations at run-time are done directly on the underlying Int values, similar to java.lang.Integer.

Source
Nat.scala
Linear Supertypes
AnyRef, Any
Known Subclasses
Type Hierarchy Learn more about scaladoc diagrams
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Nat
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by any2stringfmt
  3. by any2ArrowAssoc
  4. by any2Ensuring
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Nat()

Type Members

  1. abstract type *[_ <: Nat] <: Nat

    Multiply another Nat with this one.

  2. abstract type +[_ <: Nat] <: Nat

    Add another Nat to this one.

  3. type ++ = Succ[Self]

    Increment this Nat.

  4. abstract type Flip_^[_ <: Nat] <: Nat

  5. abstract type Fold[U, F[_ <: U] <: U, Z <: U] <: U

    The type of a folding operation on this Nat.

  6. abstract type Self <: Nat

    The type of this Nat object.

  7. type ^[T <: Nat] = ^.T.Flip_^[Self]

    Raise this Nat to the exponent given by another Nat.

  8. type _0 = Self.*[_10]

    Multiply this Nat by 10.

  9. type _1 = *.+[Nat._1]

    Multiply this Nat by 10, then add 1.

  10. type _2 = *.+[Nat._2]

    Multiply this Nat by 10, then add 2.

  11. type _3 = *.+[Nat._3]

    Multiply this Nat by 10, then add 3.

  12. type _4 = *.+[Nat._4]

    Multiply this Nat by 10, then add 4.

  13. type _5 = *.+[Nat._5]

    Multiply this Nat by 10, then add 5.

  14. type _6 = *.+[Nat._6]

    Multiply this Nat by 10, then add 6.

  15. type _7 = *.+[Nat._7]

    Multiply this Nat by 10, then add 7.

  16. type _8 = *.+[Nat._8]

    Multiply this Nat by 10, then add 8.

  17. type _9 = *.+[Nat._9]

    Multiply this Nat by 10, then add 9.

Abstract Value Members

  1. abstract def self: Self

    This Nat, typed as Self.

  2. abstract def value: Int

    The equivalent Int value for this Nat.

Concrete Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

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

    Definition Classes
    AnyRef → Any
  4. def *[T <: Nat](n: T): *[T]

    Multiply another Nat with this one.

  5. def +[T <: Nat](n: T): +[T]

    Add another Nat to this one.

  6. def ++: ++

    Increment this Nat.

  7. def ->[B](y: B): (Nat, B)

    Implicit information
    This member is added by an implicit conversion from Nat to ArrowAssoc[Nat] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  8. final def ==(arg0: AnyRef): Boolean

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

    Definition Classes
    Any
  10. def ^[T <: Nat](n: T): ^[T]

    Raise this Nat to the exponent given by another Nat.

  11. def _0: _0

    Multiply this Nat by 10.

  12. def _1: _1

    Multiply this Nat by 10, then add 1.

  13. def _2: _2

    Multiply this Nat by 10, then add 2.

  14. def _3: _3

    Multiply this Nat by 10, then add 3.

  15. def _4: _4

    Multiply this Nat by 10, then add 4.

  16. def _5: _5

    Multiply this Nat by 10, then add 5.

  17. def _6: _6

    Multiply this Nat by 10, then add 6.

  18. def _7: _7

    Multiply this Nat by 10, then add 7.

  19. def _8: _8

    Multiply this Nat by 10, then add 8.

  20. def _9: _9

    Multiply this Nat by 10, then add 9.

  21. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  22. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. def ensuring(cond: (Nat) ⇒ Boolean, msg: ⇒ Any): Nat

    Implicit information
    This member is added by an implicit conversion from Nat to Ensuring[Nat] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  24. def ensuring(cond: (Nat) ⇒ Boolean): Nat

    Implicit information
    This member is added by an implicit conversion from Nat to Ensuring[Nat] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  25. def ensuring(cond: Boolean, msg: ⇒ Any): Nat

    Implicit information
    This member is added by an implicit conversion from Nat to Ensuring[Nat] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  26. def ensuring(cond: Boolean): Nat

    Implicit information
    This member is added by an implicit conversion from Nat to Ensuring[Nat] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  27. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  28. def equals(o: Any): Boolean

    Definition Classes
    Nat → AnyRef → Any
  29. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  30. def formatted(fmtstr: String): String

    Implicit information
    This member is added by an implicit conversion from Nat to StringFormat performed by method any2stringfmt in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  31. final def getClass(): Class[_]

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

    Definition Classes
    Nat → AnyRef → Any
  33. final def isInstanceOf[T0]: Boolean

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

    Definition Classes
    AnyRef
  35. final def notify(): Unit

    Definition Classes
    AnyRef
  36. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  37. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  38. def toString(): String

    Definition Classes
    Nat → AnyRef → Any
  39. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. def [B](y: B): (Nat, B)

    Implicit information
    This member is added by an implicit conversion from Nat to ArrowAssoc[Nat] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Shadowed Implicit Value Members

  1. def +(other: String): String

    Implicit information
    This member is added by an implicit conversion from Nat to StringAdd performed by method any2stringadd in scala.Predef.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (nat: StringAdd).+(other)
    Definition Classes
    StringAdd
  2. val self: Any

    Implicit information
    This member is added by an implicit conversion from Nat to StringAdd performed by method any2stringadd in scala.Predef.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (nat: StringAdd).self
    Definition Classes
    StringAdd
  3. val self: Any

    Implicit information
    This member is added by an implicit conversion from Nat to StringFormat performed by method any2stringfmt in scala.Predef.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (nat: StringFormat).self
    Definition Classes
    StringFormat

Deprecated Value Members

  1. def x: Nat

    Implicit information
    This member is added by an implicit conversion from Nat to ArrowAssoc[Nat] performed by method any2ArrowAssoc in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (nat: ArrowAssoc[Nat]).x
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use leftOfArrow instead

  2. def x: Nat

    Implicit information
    This member is added by an implicit conversion from Nat to Ensuring[Nat] performed by method any2Ensuring in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (nat: Ensuring[Nat]).x
    Definition Classes
    Ensuring
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use resultOfEnsuring instead

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from Nat to StringAdd

Inherited by implicit conversion any2stringfmt from Nat to StringFormat

Inherited by implicit conversion any2ArrowAssoc from Nat to ArrowAssoc[Nat]

Inherited by implicit conversion any2Ensuring from Nat to Ensuring[Nat]

Ungrouped