Packages

c

monix.newtypes

NewsubtypeWrapped

abstract class NewsubtypeWrapped[Src] extends Newsubtype[Src] with NewWrapped[Src]

Simple variant of Newsubtype that provides an apply builder.

Such newsubtypes are meant for simple wrappers that don't do any validation.

Usage:

type FullName = FullName.Type

object FullName extends NewsubtypeWrapped[String]

// Initializing
val name: FullName = FullName("Alexandru Nedelcu")
// No need to extract the value when a string is needed:
assert(name === "Alexandru Nedelcu")

// We can pattern-match too:
name match {
  case FullName(nameStr) =>
    assert(nameStr === "Alexandru Nedelcu")
}
Source
NewWrapped.scala
Linear Supertypes
NewWrapped[Src], Newsubtype[Src], NewsubtypeTrait[Src], NewEncoding[Src], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. NewsubtypeWrapped
  2. NewWrapped
  3. Newsubtype
  4. NewsubtypeTrait
  5. NewEncoding
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new NewsubtypeWrapped()

Type Members

  1. type Base = Src
    Definition Classes
    NewsubtypeTrait → NewEncoding
  2. implicit final class Ops extends AnyRef
    Definition Classes
    NewEncoding
  3. trait Tag extends Any
    Definition Classes
    NewEncoding
  4. abstract type Type <: Base with Tag
    Definition Classes
    NewEncoding

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. final def apply(x: Src): Type
    Definition Classes
    NewWrapped
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. implicit final val builder: Aux[Type, Src]
    Definition Classes
    NewWrapped
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  8. final def derive[F[_]](implicit ev: F[Src]): F[Type]
    Attributes
    protected
    Definition Classes
    NewEncoding
    Annotations
    @inline()
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  11. final def extract(value: Type): Src
    Attributes
    protected
    Definition Classes
    NewEncoding
    Annotations
    @inline()
  12. implicit final val extractor: Aux[Type, Src]
    Definition Classes
    NewEncoding
  13. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  14. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  18. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  19. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  20. def toString(): String
    Definition Classes
    AnyRef → Any
  21. implicit val typeInfo: TypeInfo[Type]
    Definition Classes
    NewEncoding
  22. final def unapply[A](a: A)(implicit ev: =:=[A, Type]): Some[Src]
    Definition Classes
    NewWrapped
  23. final def unsafeCoerce(value: Src): Type
    Attributes
    protected
    Definition Classes
    NewEncoding
    Annotations
    @inline()
  24. final def value(x: Type): Src
    Definition Classes
    NewEncoding
    Annotations
    @inline()
  25. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  26. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  27. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from NewWrapped[Src]

Inherited from Newsubtype[Src]

Inherited from NewsubtypeTrait[Src]

Inherited from NewEncoding[Src]

Inherited from AnyRef

Inherited from Any

Ungrouped