shapeless.syntax

CoproductOps

final class CoproductOps[C <: Coproduct] extends AnyRef

Carrier for Coproduct operations.

These methods are implemented here and extended onto the minimal Coproduct types to avoid issues that would otherwise be caused by the covariance of :+:[H, T].

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. CoproductOps
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new CoproductOps(c: C)

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def align[K <: Coproduct](k: K)(implicit align: Align[C, K]): K

    Permutes this Coproduct into the same order as another Coproduct.

    Permutes this Coproduct into the same order as another Coproduct. Available only if both Coproducts have elements of the same types.

  7. def align[K <: Coproduct](implicit align: Align[C, K]): K

    Permutes this Coproduct into the same order as another Coproduct.

    Permutes this Coproduct into the same order as another Coproduct. An explicit type argument must be supplied. Available only if both Coproducts have elements of the same types.

  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. def at(n: Nat)(implicit at: At[C, N]): Option[A]

    Returns the nth element of this Coproduct.

    Returns the nth element of this Coproduct. Available only if there is evidence that this Coproduct has at least n elements.

  10. def at[N <: Nat](implicit at: At[C, N]): Option[A]

    Returns the nth element of this Coproduct.

    Returns the nth element of this Coproduct. An explicit type must be provided. Available only if there is evidence that this Coproduct has at least n elements.

  11. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. def deembed[Sub <: Coproduct](implicit basis: Basis[C, Sub]): Out

    De-embeds a sub-Coproduct from this Coproduct if possible.

  13. def drop(n: Nat)(implicit drop: Drop[C, N]): Out

    Drops the first n elements of this Coproduct.

    Drops the first n elements of this Coproduct. Available only if there is evidence that this Coproduct has at least n elements.

  14. def drop[N <: Nat](implicit drop: Drop[C, N]): Out

    Drops the first n elements of this Coproduct.

    Drops the first n elements of this Coproduct. An explicit type argument must be provided. Available only if there is evidence that this Coproduct has at least n elements.

  15. def embed[Super <: Coproduct](implicit basis: Basis[Super, C]): Super

    Embeds this Coproduct into a "bigger" Coproduct if possible.

  16. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  17. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  18. def extendLeft[T]: :+:[T, C]

    Extend this Coproduct on the left.

  19. def extendLeftBy[K <: Coproduct](implicit extendLeftBy: ExtendLeftBy[K, C]): Out

    Extend this Coproduct on the left.

  20. def extendRight[T](implicit extendRight: ExtendRight[C, T]): Out

    Extend this Coproduct on the right.

  21. def extendRightBy[K <: Coproduct](implicit extendRightBy: ExtendRightBy[C, K]): Out

    Extend this Coproduct on the right.

  22. def filter[U](implicit partition: Partition[C, U]): Option[Prefix]

    Returns all elements of type U of this Coproduct.

    Returns all elements of type U of this Coproduct. An explicit type argument must be provided.

  23. def filterNot[U](implicit partition: Partition[C, U]): Option[Suffix]

    Returns all elements of type different than U of this Coproduct.

    Returns all elements of type different than U of this Coproduct. An explicit type argument must be provided.

  24. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  25. def flatMap(op: Poly)(implicit flatMap: FlatMap[C, op.type]): Out

    Flatmaps a higher rank function across this Coproduct.

  26. def fold(f: Poly)(implicit folder: Folder[f.type, C]): ops.coproduct.Folder.Out

    Computes a fold over this Coproduct using the higher ranked function f.

    Computes a fold over this Coproduct using the higher ranked function f. Available only if there is evidence f can be applied all the elements of this Coproduct.

  27. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  28. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  29. def head(implicit cc: IsCCons[C]): Option[H]

    Returns the head of this Coproduct

  30. def init(implicit il: InitLast[C]): Option[I]

    Returns all elements except the last

  31. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  32. def last(implicit il: InitLast[C]): Option[L]

    Returns the last element of this 'Coproduct'

  33. def length(implicit length: Length[C]): Out

    Compute the length of this Coproduct.

  34. def map(f: Poly)(implicit mapper: Mapper[f.type, C]): Out

    Maps a higher rank function across this Coproduct.

  35. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  36. final def notify(): Unit

    Definition Classes
    AnyRef
  37. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  38. def partition[U](implicit partition: Partition[C, U]): Either[Prefix, Suffix]

  39. def partitionC[U](implicit partition: Partition[C, U]): :+:[Prefix, :+:[Suffix, CNil]]

  40. def removeElem[U](implicit remove: Remove[C, U]): Either[U, Rest]

    Returns the first element of type U of this Coproduct plus the remainder of the Coproduct.

    Returns the first element of type U of this Coproduct plus the remainder of the Coproduct. An explicit type argument must be provided. Available only if there is evidence that this Coproduct has an element of type U.

  41. def removeElemC[U](implicit remove: Remove[C, U]): :+:[U, Rest]

    Returns the first element of type U of this Coproduct plus the remainder of the Coproduct.

    Returns the first element of type U of this Coproduct plus the remainder of the Coproduct. An explicit type argument must be provided. Available only if there is evidence that this Coproduct has an element of type U.

  42. def reverse(implicit reverse: Reverse[C]): Out

    Reverses this Coproduct.

  43. def rotateLeft(n: Nat)(implicit rotateLeft: RotateLeft[C, N]): Out

    Rotate this 'Coproduct' left by n

  44. def rotateLeft[N <: Nat](implicit rotateLeft: RotateLeft[C, N]): Out

    Rotate this 'Coproduct' left by N.

    Rotate this 'Coproduct' left by N. An explicit type argument must be provided.

  45. def rotateRight(n: Nat)(implicit rotateRight: RotateRight[C, N]): Out

    Rotate this 'Coproduct' right by n

  46. def rotateRight[N <: Nat](implicit rotateRight: RotateRight[C, N]): Out

    Rotate this 'Coproduct' right by N.

    Rotate this 'Coproduct' right by N. An explicit type argument must be provided.

  47. def select[T](implicit selector: Selector[C, T]): Option[T]

    Returns the first element of type U of this Coproduct.

    Returns the first element of type U of this Coproduct. An explicit type argument must be provided. Available only if there is evidence that this Coproduct has an element of type U.

  48. def split(n: Nat)(implicit split: Split[C, N]): Out

    Splits this Coproduct at the nth element, returning the prefix and suffix as a pair.

    Splits this Coproduct at the nth element, returning the prefix and suffix as a pair. Available only if there is evidence that this Coproduct has at least n elements.

  49. def split[N <: Nat](implicit split: Split[C, N]): Out

    Splits this Coproduct at the nth element, returning the prefix and suffix as a pair.

    Splits this Coproduct at the nth element, returning the prefix and suffix as a pair. An explicit type argument must be provided. Available only if there is evidence that this Coproduct has at least n elements.

  50. def splitC(n: Nat)(implicit split: Split[C, N]): :+:[Left, :+:[Right, CNil]]

  51. def splitC[N <: Nat](implicit split: Split[C, N]): :+:[Left, :+:[Right, CNil]]

  52. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  53. def tail(implicit cc: IsCCons[C]): Option[T]

    Returns the tail of this Coproduct

  54. def take(n: Nat)(implicit take: Take[C, N]): Out

    Takes the first n elements of this Coproduct.

    Takes the first n elements of this Coproduct. Available only if there is evidence that this Coproduct has at least n elements.

  55. def take[N <: Nat](implicit take: Take[C, N]): Out

    Takes the first n elements of this Coproduct.

    Takes the first n elements of this Coproduct. An explicit type argument must be provided. Available only if there is evidence that this Coproduct has at least n elements.

  56. def toString(): String

    Definition Classes
    AnyRef → Any
  57. def unify(implicit unifier: Unifier[C]): ops.coproduct.Unifier.Out

    Returns an Coproduct typed as a repetition of the least upper bound of the types of the elements of this Coproduct.

  58. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  59. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  60. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  61. def zipWithKeys[K <: HList](implicit zipWithKeys: ZipWithKeys[K, C]): Out

    Converts this Coproduct of values into a union with given keys.

    Converts this Coproduct of values into a union with given keys. A type argument must be provided.

  62. def zipWithKeys[K <: HList](keys: K)(implicit zipWithKeys: ZipWithKeys[K, C]): Out

    Converts this Coproduct of values into a union with the provided keys.

Inherited from AnyRef

Inherited from Any

Ungrouped