Class

io.chymyst.jc

Wrap

Related Doc: package jc

Permalink

final case class Wrap[T](x: T) extends AnyVal with Product with Serializable

Wrapper for unapply(). According to https://github.com/scala/scala/pull/2848 the unapply() function can return any type that directly contains methods isEmpty: Boolean and get: T where T can be either a tuple type with extractors _1, _2 etc., or another type.

This wrapper is for wrapping a value that is unconditionally returned by unapply(), as molecule extractors must do. Since that value is of an unknown type T, we can't add the named extractor API on top of that type. So we must use this wrapper.

T

Type of the molecule value.

x

Molecule value wrapped and to be returned by unapply().

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyVal, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Wrap
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyVal
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Wrap(x: T)

    Permalink

    x

    Molecule value wrapped and to be returned by unapply().

Value Members

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

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

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

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

    Permalink
    Definition Classes
    Any
  5. def get: T

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

    Permalink
    Definition Classes
    AnyVal → Any
  7. def isEmpty: Boolean

    Permalink
  8. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  9. val x: T

    Permalink

    Molecule value wrapped and to be returned by unapply().

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyVal

Inherited from Any

Ungrouped