Class

shapeless.syntax.std

TupleOps

Related Doc: package std

Permalink

final class TupleOps[T] extends Serializable

Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. TupleOps
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new TupleOps(t: T)

    Permalink

Type Members

  1. class PatchAux[N <: Nat, M <: Nat] extends AnyRef

    Permalink
  2. class ReplaceTypeAux[U] extends AnyRef

    Permalink
  3. class UpdateWithAux[U] extends AnyRef

    Permalink
  4. class UpdatedAtAux[N <: Nat] extends AnyRef

    Permalink
  5. class UpdatedTypeAux[U] extends AnyRef

    Permalink

Value Members

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  3. def ++[U](u: U)(implicit prepend: Prepend[T, U]): ops.tuple.Prepend.Out

    Permalink

    Append the argument tuple to this tuple.

  4. def ++:[U](u: U)(implicit prepend: Prepend[U, T]): ops.tuple.Prepend.Out

    Permalink

    Prepend the argument tuple to this tuple.

  5. def +:[E](e: E)(implicit prepend: Prepend[(E), T]): ops.tuple.Prepend.Out

    Permalink

    Prepend the argument element to this tuple.

  6. def :+[E](e: E)(implicit prepend: Prepend[T, (E)]): ops.tuple.Prepend.Out

    Permalink

    Append the argument element to this tuple.

  7. def :::[U](u: U)(implicit prepend: Prepend[U, T]): ops.tuple.Prepend.Out

    Permalink

    Prepend the argument tuple to this tuple.

  8. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. def apply(n: Nat)(implicit at: At[T, N]): ops.tuple.At.Out

    Permalink

    Returns the nth element of this tuple.

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

  10. def apply[N <: Nat](implicit at: At[T, N]): ops.tuple.At.Out

    Permalink

    Returns the nth element of this tuple.

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

  11. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  12. def at(n: Nat)(implicit at: At[T, N]): ops.tuple.At.Out

    Permalink

    Returns the nth element of this tuple.

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

  13. def at[N <: Nat](implicit at: At[T, N]): ops.tuple.At.Out

    Permalink

    Returns the nth element of this tuple.

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

  14. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  15. def collect(p: Poly)(implicit collect: Collect[T, p.type]): ops.tuple.Collect.Out

    Permalink

    Collect a higher rank function across this tuple

  16. def drop(n: Nat)(implicit drop: Drop[T, N]): ops.tuple.Drop.Out

    Permalink

    Returns all but the first n elements of this tuple.

    Returns all but the first n elements of this tuple. Available only if there is evidence that this tuple has at least n elements.

  17. def drop[N <: Nat](implicit drop: Drop[T, N]): ops.tuple.Drop.Out

    Permalink

    Returns all but the first n elements of this tuple.

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  20. def filter[U](implicit filter: Filter[T, U]): ops.tuple.Filter.Out

    Permalink

    Returns all elements of type U of this tuple.

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

  21. def filterNot[U](implicit filterNot: FilterNot[T, U]): ops.tuple.FilterNot.Out

    Permalink

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

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

  22. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  23. def flatMap(f: Poly)(implicit mapper: FlatMapper[T, f.type]): ops.tuple.FlatMapper.Out

    Permalink

    Flatmaps a higher rank function across this tuple.

  24. def foldLeft[R](z: R)(op: Poly)(implicit folder: LeftFolder[T, R, op.type]): ops.tuple.LeftFolder.Out

    Permalink

    Computes a left fold over this tuple using the polymorphic binary combining operator op.

    Computes a left fold over this tuple using the polymorphic binary combining operator op. Available only if there is evidence op can consume/produce all the partial results of the appropriate types.

  25. def foldMap[R](z: R)(f: Poly)(op: (R, R) ⇒ R)(implicit folder: MapFolder[T, R, f.type]): R

    Permalink

    Maps a higher rank function f across this tuple and folds the result using monomorphic combining operator op.

    Maps a higher rank function f across this tuple and folds the result using monomorphic combining operator op. Available only if there is evidence that the result type of f at each element conforms to the argument type of op.

  26. def foldRight[R](z: R)(op: Poly)(implicit folder: RightFolder[T, R, op.type]): ops.tuple.RightFolder.Out

    Permalink

    Computes a right fold over this tuple using the polymorphic binary combining operator op.

    Computes a right fold over this tuple using the polymorphic binary combining operator op. Available only if there is evidence op can consume/produce all the partial results of the appropriate types.

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

    Permalink
    Definition Classes
    AnyRef → Any
  28. def group[Pad](n: Nat, step: Nat, pad: Pad)(implicit grouper: PaddedGrouper[T, N, N, Pad]): ops.tuple.PaddedGrouper.Out

    Permalink

    Groups the elements of this Tuple into tuples of n elements, offset by step Use elements in pad as necessary to complete last group up to n items.

  29. def group(n: Nat, step: Nat)(implicit grouper: Grouper[T, N, N]): ops.tuple.Grouper.Out

    Permalink

    Groups the elements of this Tuple into tuples of n elements, offset by step

  30. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  31. def head(implicit c: IsComposite[T]): H

    Permalink

    Returns the first element of this tuple.

  32. def init(implicit init: Init[T]): ops.tuple.Init.Out

    Permalink

    Returns a tuple consisting of all the elements of this tuple except the last.

    Returns a tuple consisting of all the elements of this tuple except the last. Available only if there is evidence that this tuple is composite.

  33. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  34. def last(implicit last: Last[T]): ops.tuple.Last.Out

    Permalink

    Returns the last element of this tuple.

    Returns the last element of this tuple. Available only if there is evidence that this tuple is composite.

  35. def length(implicit length: Length[T]): ops.tuple.Length.Out

    Permalink

    Compute the length of this tuple.

  36. def map(f: Poly)(implicit mapper: Mapper[T, f.type]): ops.tuple.Mapper.Out

    Permalink

    Maps a higher rank function across this tuple.

  37. def mapConst[C](c: C)(implicit mapper: ConstMapper[T, C]): ops.tuple.ConstMapper.Out

    Permalink

    Replaces each element of this tuple with a constant value.

  38. def mkString(start: String, sep: String, end: String)(implicit toTraversable: Aux[T, List, Any]): String

    Permalink

    Displays all elements of this tuple in a string using start, end, and separator strings.

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

    Permalink
    Definition Classes
    AnyRef
  40. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  41. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  42. def patch[N <: Nat, M <: Nat]: PatchAux[N, M]

    Permalink

    Produces a new tuple where a slice of this tuple is replaced by another.

    Produces a new tuple where a slice of this tuple is replaced by another. Two explicit type arguments must be provided. Available only if there are at least N plus M elements.

  43. def patch[In](n: Nat, in: In, m: Nat)(implicit patcher: Patcher[N, N, T, In]): ops.tuple.Patcher.Out

    Permalink

    Produces a new tuple where a slice of this tuple is replaced by another.

    Produces a new tuple where a slice of this tuple is replaced by another. Available only if there are at least n plus m elements.

  44. def permutations(implicit permutations: Permutations[T]): ops.tuple.Permutations.Out

    Permalink

    Returns all permutations of this tuple.

  45. def productElements(implicit gen: Generic[T]): Repr

    Permalink

    Returns an HList containing the elements of this tuple.

  46. def reduceLeft(op: Poly)(implicit reducer: LeftReducer[T, op.type]): ops.tuple.LeftReducer.Out

    Permalink

    Computes a left reduce over this tuple using the polymorphic binary combining operator op.

    Computes a left reduce over this tuple using the polymorphic binary combining operator op. Available only if there is evidence that this tuple has at least one element and that op can consume/produce all the partial results of the appropriate types.

  47. def reduceRight(op: Poly)(implicit reducer: RightReducer[T, op.type]): ops.tuple.RightReducer.Out

    Permalink

    Computes a right reduce over this tuple using the polymorphic binary combining operator op.

    Computes a right reduce over this tuple using the polymorphic binary combining operator op. Available only if there is evidence that this tuple has at least one element and that op can consume/produce all the partial results of the appropriate types.

  48. def removeAll[S](implicit removeAll: RemoveAll[T, S]): ops.tuple.RemoveAll.Out

    Permalink

    Returns the first elements of this tuple that have types in S plus the remainder of the tuple.

    Returns the first elements of this tuple that have types in S plus the remainder of the tuple. An expicit type argument must be provided. Available only if there is evidence that this tuple contains elements with types in S.

  49. def removeElem[U](implicit remove: Remove[T, U]): ops.tuple.Remove.Out

    Permalink

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

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

    The Elem suffix is here for consistency with the corresponding method name for HList and should be removed when the latter is removed.

  50. def replace[U](u: U)(implicit replacer: Replacer[T, U, U]): ops.tuple.Replacer.Out

    Permalink

    Replaces the first element of type U of this tuple with the supplied value, also of type U returning both the replaced element and the updated tuple.

    Replaces the first element of type U of this tuple with the supplied value, also of type U returning both the replaced element and the updated tuple. Available only if there is evidence that this tuple has an element of type U.

  51. def replaceType[U]: ReplaceTypeAux[U]

    Permalink

    Replaces the first element of type U of this tuple with the supplied value of type V, returning both the replaced element and the updated tuple.

    Replaces the first element of type U of this tuple with the supplied value of type V, returning both the replaced element and the updated tuple. An explicit type argument must be provided for U. Available only if there is evidence that this tuple has an element of type U.

  52. def reverse(implicit reverse: Reverse[T]): ops.tuple.Reverse.Out

    Permalink

    Reverses this tuple.

  53. def reverse_:::[U](u: U)(implicit prepend: ReversePrepend[U, T]): ops.tuple.ReversePrepend.Out

    Permalink

    Prepend the reverse of the argument tuple to this tuple.

  54. def reverse_split(n: Nat)(implicit split: ReverseSplit[T, N]): ops.tuple.ReverseSplit.Out

    Permalink

    Splits this tuple at the nth element, returning the reverse of the prefix and suffix as a pair.

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

  55. def reverse_split[N <: Nat](implicit split: ReverseSplit[T, N]): ops.tuple.ReverseSplit.Out

    Permalink

    Splits this tuple at the nth element, returning the reverse of the prefix and suffix as a pair.

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

  56. def reverse_splitLeft[U](implicit splitLeft: ReverseSplitLeft[T, U]): ops.tuple.ReverseSplitLeft.Out

    Permalink

    Splits this tuple at the first occurrence of an element of type U, returning reverse of the prefix and suffix as a pair.

    Splits this tuple at the first occurrence of an element of type U, returning reverse of the prefix and suffix as a pair. An explicit type argument must be provided. Available only if there is evidence that this tuple has an element of type U.

  57. def reverse_splitRight[U](implicit splitRight: ReverseSplitRight[T, U]): ops.tuple.ReverseSplitRight.Out

    Permalink

    Splits this tuple at the last occurrence of an element of type U, returning reverse of the prefix and suffix as a pair.

    Splits this tuple at the last occurrence of an element of type U, returning reverse of the prefix and suffix as a pair. An explicit type argument must be provided. Available only if there is evidence that this tuple has an element of type U.

  58. def rotateLeft(n: Nat)(implicit rotateLeft: RotateLeft[T, N]): ops.tuple.RotateLeft.Out

    Permalink

    Rotate this tuple left by N

  59. def rotateRight(n: Nat)(implicit rotateRight: RotateRight[T, N]): ops.tuple.RotateRight.Out

    Permalink

    Rotate this tuple right by N

  60. def scanLeft[Z, P <: Poly](z: Z)(op: Poly)(implicit scanL: LeftScanner[T, Z, op.type]): ops.tuple.LeftScanner.Out

    Permalink

    Computes a left scan over this tuple using the polymorphic binary combining operator op.

    Computes a left scan over this tuple using the polymorphic binary combining operator op. Available only if there is evidence op can consume/produce all the results of the appropriate types.

  61. def scanRight[Z, P <: Poly](z: Z)(op: Poly)(implicit scanR: RightScanner[T, Z, op.type]): ops.tuple.RightScanner.Out

    Permalink

    Computes a left scan over this tuple using the polymorphic binary combining operator op.

    Computes a left scan over this tuple using the polymorphic binary combining operator op. Available only if there is evidence op can consume/produce all the results of the appropriate types.

  62. def select[U](implicit selector: Selector[T, U]): Out

    Permalink

    Returns the first element of type U of this tuple.

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

  63. def split(n: Nat)(implicit split: Split[T, N]): ops.tuple.Split.Out

    Permalink

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

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

  64. def split[N <: Nat](implicit split: Split[T, N]): ops.tuple.Split.Out

    Permalink

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

    Splits this tuple 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 tuple has at least n elements.

  65. def splitLeft[U](implicit splitLeft: SplitLeft[T, U]): ops.tuple.SplitLeft.Out

    Permalink

    Splits this tuple at the first occurrence of an element of type U, returning the prefix and suffix as a pair.

    Splits this tuple at the first occurrence of an element of type U, returning the prefix and suffix as a pair. An explicit type argument must be provided. Available only if there is evidence that this tuple has an element of type U.

  66. def splitRight[U](implicit splitRight: SplitRight[T, U]): ops.tuple.SplitRight.Out

    Permalink

    Splits this tuple at the last occurrence of an element of type U, returning the prefix and suffix as a pair.

    Splits this tuple at the last occurrence of an element of type U, returning the prefix and suffix as a pair. An explicit type argument must be provided. Available only if there is evidence that this tuple has an element of type U.

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

    Permalink
    Definition Classes
    AnyRef
  68. def tail(implicit c: IsComposite[T]): T

    Permalink

    Returns that tail of this tuple.

    Returns that tail of this tuple. Available only if there is evidence that this tuple is composite.

  69. def take(n: Nat)(implicit take: Take[T, N]): ops.tuple.Take.Out

    Permalink

    Returns the first n elements of this tuple.

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

  70. def take[N <: Nat](implicit take: Take[T, N]): ops.tuple.Take.Out

    Permalink

    Returns the first n elements of this tuple.

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

  71. def to[M[_]](implicit toTraversable: ToTraversable[T, M]): Out

    Permalink

    Converts this tuple to a M of elements typed as the least upper bound of the types of the elements of this tuple.

  72. def toArray[Lub](implicit toTraversable: Aux[T, Array, Lub]): (toTraversable)#Out

    Permalink

    Converts this tuple to an Array of elements typed as the least upper bound of the types of the elements of this tuple.

    Converts this tuple to an Array of elements typed as the least upper bound of the types of the elements of this tuple.

    It is advisable to specify the type parameter explicitly, because for many reference types, case classes in particular, the inferred type will be too precise (ie. Product with Serializable with CC for a typical case class CC) which interacts badly with the invariance of Arrays.

  73. def toList[Lub](implicit toTraversable: Aux[T, List, Lub]): (toTraversable)#Out

    Permalink

    Converts this tuple to a List of elements typed as the least upper bound of the types of the elements of this tuple.

  74. def toSized[M[_]](implicit toSized: ToSized[T, M]): ops.tuple.ToSized.Out

    Permalink

    Converts this tuple to a M of elements typed as the least upper bound of the types of the elements of this tuple.

  75. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  76. def transpose(implicit transpose: Transposer[T]): ops.tuple.Transposer.Out

    Permalink

    Transposes this tuple.

  77. def unify(implicit unifier: Unifier[T]): ops.tuple.Unifier.Out

    Permalink

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

  78. def unifySubtypes[B](implicit subtypeUnifier: SubtypeUnifier[T, B]): ops.tuple.SubtypeUnifier.Out

    Permalink

    Returns a tuple with all elements that are subtypes of B typed as B.

  79. def unzip(implicit transpose: Transposer[T]): ops.tuple.Transposer.Out

    Permalink

    Unzips this tuple of tuples returning a tuple of tuples.

    Unzips this tuple of tuples returning a tuple of tuples. Available only if there is evidence that this tuple has tuple elements.

  80. def updateAtWith[U](n: NatWith[[t]At[T, t]])(f: (ops.tuple.At.Out) ⇒ U)(implicit upd: ModifierAt[T, N, ops.tuple.At.Out, U]): ops.tuple.ModifierAt.Out

    Permalink

    Replaces the Nth element of this Tuple with the result of calling the supplied function on it.

    Replaces the Nth element of this Tuple with the result of calling the supplied function on it. Available only if there is evidence that this Tuple has N elements.

  81. def updateWith[U]: UpdateWithAux[U]

    Permalink

    Replaces the first element of type U of this tuple with the result of its transformation to a V via the supplied function.

    Replaces the first element of type U of this tuple with the result of its transformation to a V via the supplied function. Available only if there is evidence that this tuple has an element of type U.

  82. def updatedAt[U, V, R](n: Nat, u: U)(implicit replacer: Aux[T, N, U, (V, R)]): R

    Permalink

    Replaces the nth' element of this tuple with the supplied value of type U. Available only if there is evidence that this tuple has at least n elements.

  83. def updatedAt[N <: Nat]: UpdatedAtAux[N]

    Permalink

    Replaces the nth' element of this tuple with the supplied value of type U. An explicit type argument must be provided for N. Available only if there is evidence that this tuple has at least n elements.

  84. def updatedElem[U, R](u: U)(implicit replacer: Aux[T, U, U, (U, R)]): R

    Permalink

    Replaces the first element of type U of this tuple with the supplied value, also of type U.

    Replaces the first element of type U of this tuple with the supplied value, also of type U. Available only if there is evidence that this tuple has an element of type U.

    The Elem suffix is here for consistency with the corresponding method name for HList and should be removed when the latter is removed.

  85. def updatedType[U]: UpdatedTypeAux[U]

    Permalink

    Replaces the first element of type U of this tuple with the supplied value of type V.

    Replaces the first element of type U of this tuple with the supplied value of type V. An explicit type argument must be provided for U. Available only if there is evidence that this tuple has an element of type U.

  86. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  89. def zip(implicit transpose: Transposer[T]): ops.tuple.Transposer.Out

    Permalink

    Zips this tuple of tuples returning a tuple of tuples.

    Zips this tuple of tuples returning a tuple of tuples. Available only if there is evidence that this tuple has tuple elements.

  90. def zip[R](r: R)(implicit transpose: Transposer[(T, R)]): ops.tuple.Transposer.Out

    Permalink

    Zips this tuple with its argument tuple returning a tuple of pairs.

  91. def zipApply[A](a: A)(implicit zipper: ZipApply[T, A]): ops.tuple.ZipApply.Out

    Permalink

    Zips this tuple of monomorphic function values with its argument tuple of correspondingly typed function arguments returning the result of each application as a tuple.

    Zips this tuple of monomorphic function values with its argument tuple of correspondingly typed function arguments returning the result of each application as a tuple. Available only if there is evidence that the corresponding function and argument elements have compatible types.

  92. def zipConst[C](c: C)(implicit zipper: ZipConst[T, C]): ops.tuple.ZipConst.Out

    Permalink

    Zips this tuple with a constant, resulting in a tuple of tuples, with each element being of the form ({element from original tuple}, {supplied constant})

  93. def zipOne[R](r: R)(implicit zipOne: ZipOne[T, R]): ops.tuple.ZipOne.Out

    Permalink

    Zips this tuple with its argument tuple of tuples, returning a tuple of tuples with each element of this tuple prepended to the corresponding tuple element of the argument tuple.

  94. def zipWithIndex(implicit zipper: ZipWithIndex[T]): ops.tuple.ZipWithIndex.Out

    Permalink

    Zips this tuple with its element indices, resulting in a tuple of tuples of the form ({element from input tuple}, {element index})

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped