final class UnionOps[C <: Coproduct] extends AnyVal with Serializable

Discriminated union operations on Coproducts's with field-like elements.

Linear Supertypes
Serializable, Serializable, AnyVal, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. UnionOps
  2. Serializable
  3. Serializable
  4. AnyVal
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new UnionOps(c: C)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##(): Int
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
  4. def apply(k: Witness)(implicit selector: Selector[C, T]): Out

    Returns the value associated with the singleton typed key k.

    Returns the value associated with the singleton typed key k. Only available if this union has a field with with keyType equal to the singleton type k.T.

    Note that this can creates a bogus ambiguity with CoproductOps#apply as described in https://issues.scala-lang.org/browse/SI-5142. If this method is accessible the conflict can be worked around by using CoproductOps#at instead of CoproductOps#apply.

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. val c: C
  7. def fields(implicit fields: Fields[C]): Out

    Returns a Coproduct made of the key-value pairs of this union.

  8. def get(k: Witness)(implicit selector: Selector[C, T]): Out

    Returns the value associated with the singleton typed key k.

    Returns the value associated with the singleton typed key k. Only available if this union has a field with with keyType equal to the singleton type k.T.

  9. def getClass(): Class[_ <: AnyVal]
    Definition Classes
    AnyVal → Any
  10. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  11. def keys(implicit keys: Keys[C]): Out

    Returns the keys of this union as an HList of singleton typed values.

  12. def mapValues(f: Poly)(implicit mapValues: MapValues[f.type, C]): Out

    Maps a higher rank function across the values of this union.

  13. def toMap[K, V](implicit toMap: Aux[C, K, V]): Map[K, V]

    Returns a Map whose keys and values are typed as the Lub of the keys and values of this union.

  14. def toString(): String
    Definition Classes
    Any
  15. def union: DynamicUnionOps[C]

    Returns a wrapped version of this union that provides selectDynamic access to fields.

  16. def values(implicit values: Values[C]): Out

    Returns a Coproduct of the values of this union.

Inherited from Serializable

Inherited from Serializable

Inherited from AnyVal

Inherited from Any

Ungrouped