shapeless.syntax.std

TupleOps

Related Doc: package std

final class TupleOps[T] extends AnyRef

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

Instance Constructors

  1. new TupleOps(t: T)

Type Members

  1. class ReplaceTypeAux[U] extends AnyRef

  2. class UpdatedAtAux[N <: Nat] extends AnyRef

  3. class UpdatedTypeAux[U] extends AnyRef

Value Members

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

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

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

    Append the argument tuple to this tuple.

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

    Prepend the argument tuple to this tuple.

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

    Prepend the argument element to this tuple.

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

    Append the argument element to this tuple.

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

    Prepend the argument tuple to this tuple.

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

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

    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

    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

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

    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

    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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  15. def drop(n: Nat)(implicit drop: Drop[T, N]): ops.tuple.Drop.Out

    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.

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

    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.

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

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

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

    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.

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

    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.

  21. def finalize(): Unit

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

    Flatmaps a higher rank function across this tuple.

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

    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.

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

    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.

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

    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.

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

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

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

    Returns the first element of this tuple.

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

    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.

  30. final def isInstanceOf[T0]: Boolean

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

    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.

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

    Compute the length of this tuple.

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

    Maps a higher rank function across this tuple.

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

    Replaces each element of this tuple with a constant value.

  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 productElements(implicit gen: Generic[T]): Repr

    Returns an HList containing the elements of this tuple.

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

    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.

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

    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.

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

    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.

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

    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.

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

    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.

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

    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.

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

    Reverses this tuple.

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

    Prepend the reverse of the argument tuple to this tuple.

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

    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.

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

    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.

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

    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.

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

    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.

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

    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.

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

    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.

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

    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.

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

    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.

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

    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.

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

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

    Returns that tail of this tuple.

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

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

    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.

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

    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.

  60. def toArray[Lub](implicit toArray: ToArray[T, Lub]): ops.tuple.ToArray.Out

    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.

  61. def toList[Lub](implicit toList: ToList[T, Lub]): ops.tuple.ToList.Out

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

  62. def toString(): String

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

    Transposes this tuple.

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

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

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

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

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

    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.

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

    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.

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

    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.

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

    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.

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

    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.

  71. final def wait(): Unit

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

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

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

    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.

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

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

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

    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.

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

    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})

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

    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.

Inherited from AnyRef

Inherited from Any

Ungrouped