final case classWrap[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
Alphabetic
By Inheritance
Inherited
Wrap
Serializable
Serializable
Product
Equals
AnyVal
Any
Hide All
Show All
Visibility
Public
All
Instance Constructors
newWrap(x: T)
x
Molecule value wrapped and to be returned by unapply().
Value Members
final def!=(arg0: Any): Boolean
Definition Classes
Any
final def##(): Int
Definition Classes
Any
final def==(arg0: Any): Boolean
Definition Classes
Any
final defasInstanceOf[T0]: T0
Definition Classes
Any
defget: T
defgetClass(): Class[_ <: AnyVal]
Definition Classes
AnyVal → Any
defisEmpty: Boolean
final defisInstanceOf[T0]: Boolean
Definition Classes
Any
valx: T
Molecule value wrapped and to be returned by unapply().
Wrapper for
unapply()
. According to https://github.com/scala/scala/pull/2848 theunapply()
function can return any type that directly contains methodsisEmpty: Boolean
andget: T
whereT
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 typeT
, we can't add the named extractor API on top of that type. So we must use this wrapper.Type of the molecule value.
Molecule value wrapped and to be returned by
unapply()
.