Packages

abstract class Newtype[A] extends NewtypeModule.Newtype[A]

The class of objects corresponding to newtypes. Users should implement an object that extends this class to create their own newtypes, specifying A as the underlying type to wrap.

object Meter extends Newtype[Double]
type Meter = Meter.Type
Linear Supertypes
NewtypeModule.Newtype[A], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Newtype
  2. Newtype
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Newtype()

Type Members

  1. trait Tag extends Any
  2. type Type = NewtypeModule.Newtype.Type with Tag
    Definition Classes
    Newtype → Newtype

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def apply(value: A): Type

    Converts an instance of the underlying type to an instance of the newtype.

    Converts an instance of the underlying type to an instance of the newtype.

    Definition Classes
    Newtype
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  10. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. val newtype: NewtypeModule.Newtype[A]
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  18. def toString(): String
    Definition Classes
    AnyRef → Any
  19. def unapply(value: Type): Some[A]

    Allows pattern matching on newtype instances to convert them back to instances of the underlying type.

    Allows pattern matching on newtype instances to convert them back to instances of the underlying type.

    Definition Classes
    Newtype
  20. def unwrap(value: Type): A

    Converts an instance of the newtype back to an instance of the underlying type.

    Converts an instance of the newtype back to an instance of the underlying type.

    Definition Classes
    Newtype
  21. def unwrapAll[F[_]](value: F[Type]): F[A]

    Converts an instance of a type parameterized on the newtype back to an instance of a type parameterized on the underlying type.

    Converts an instance of a type parameterized on the newtype back to an instance of a type parameterized on the underlying type. For example, this could be used to convert a list of instances of the newtype back to a list of instances of the underlying type.

    Definition Classes
    Newtype → Newtype
  22. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  23. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  24. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  25. def wrap(value: A): Type

    Converts an instance of the underlying type to an instance of the newtype.

    Converts an instance of the underlying type to an instance of the newtype.

    Definition Classes
    Newtype
  26. def wrapAll[F[_]](value: F[A]): F[Type]

    Converts an instance of a type parameterized on the underlying type to an instance of a type parameterized on the newtype.

    Converts an instance of a type parameterized on the underlying type to an instance of a type parameterized on the newtype. For example, this could be used to convert a list of instances of the underlying type to a list of instances of the newtype.

    Definition Classes
    Newtype → Newtype

Inherited from NewtypeModule.Newtype[A]

Inherited from AnyRef

Inherited from Any

Ungrouped