final class TupleOps[T] extends Serializable
- Alphabetic
- By Inheritance
- TupleOps
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new TupleOps(t: T)
Type Members
- class PatchAux[N <: Nat, M <: Nat] extends AnyRef
- class ReplaceTypeAux[U] extends AnyRef
- class UpdateWithAux[U] extends AnyRef
- class UpdatedAtAux[N <: Nat] extends AnyRef
- class UpdatedTypeAux[U] extends AnyRef
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
++[U](u: U)(implicit prepend: Prepend[T, U]): ops.tuple.Prepend.Out
Append the argument tuple to this tuple.
-
def
++:[U](u: U)(implicit prepend: Prepend[U, T]): ops.tuple.Prepend.Out
Prepend the argument tuple to this tuple.
-
def
+:[E](e: E)(implicit prepend: Prepend[(E), T]): ops.tuple.Prepend.Out
Prepend the argument element to this tuple.
-
def
:+[E](e: E)(implicit prepend: Prepend[T, (E)]): ops.tuple.Prepend.Out
Append the argument element to this tuple.
-
def
:::[U](u: U)(implicit prepend: Prepend[U, T]): ops.tuple.Prepend.Out
Prepend the argument tuple to this tuple.
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
align[U](u: U)(implicit align: Align[T, U]): U
Permutes this
Tuple
into the same order as the suppliedTuple
with the same element types.Permutes this
Tuple
into the same order as the suppliedTuple
with the same element types. Available only if bothHList
s have elements of the same types. -
def
align[U](implicit align: Align[T, U]): U
Permutes this
Tuple
into the same order as anotherTuple
.Permutes this
Tuple
into the same order as anotherTuple
. An explicit type argument must be supplied. Available only if bothTuple
s have elements of the same types. -
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.
-
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.
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
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.
-
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.
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
collect(p: Poly)(implicit collect: Collect[T, p.type]): ops.tuple.Collect.Out
Collect a higher rank function across this tuple
-
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.
-
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.
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
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. -
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. -
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
flatMap(f: Poly)(implicit mapper: FlatMapper[T, f.type]): ops.tuple.FlatMapper.Out
Flatmaps a higher rank function across this tuple.
-
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 evidenceop
can consume/produce all the partial results of the appropriate types. -
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 off
at each element conforms to the argument type of op. -
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 evidenceop
can consume/produce all the partial results of the appropriate types. -
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
group[Pad](n: Nat, step: Nat, pad: Pad)(implicit grouper: PaddedGrouper[T, N, N, Pad]): ops.tuple.PaddedGrouper.Out
Groups the elements of this
Tuple
into tuples ofn
elements, offset bystep
Use elements inpad
as necessary to complete last group up ton
items. -
def
group(n: Nat, step: Nat)(implicit grouper: Grouper[T, N, N]): ops.tuple.Grouper.Out
Groups the elements of this
Tuple
into tuples ofn
elements, offset bystep
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
head(implicit c: IsComposite[T]): H
Returns the first element of this tuple.
-
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.
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
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.
-
def
length(implicit length: Length[T]): ops.tuple.Length.Out
Compute the length of this tuple.
-
def
map(f: Poly)(implicit mapper: Mapper[T, f.type]): ops.tuple.Mapper.Out
Maps a higher rank function across this tuple.
-
def
mapConst[C](c: C)(implicit mapper: ConstMapper[T, C]): ops.tuple.ConstMapper.Out
Replaces each element of this tuple with a constant value.
-
def
mkString(start: String, sep: String, end: String)(implicit toTraversable: Aux[T, List, Any]): String
Displays all elements of this tuple in a string using start, end, and separator strings.
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
patch[N <: Nat, M <: Nat]: PatchAux[N, M]
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
plusM
elements. -
def
patch[In](n: Nat, in: In, m: Nat)(implicit patcher: Patcher[N, N, T, In]): ops.tuple.Patcher.Out
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
plusn
elements.m
-
def
permutations(implicit permutations: Permutations[T]): ops.tuple.Permutations.Out
Returns all permutations of this tuple.
-
def
productElements(implicit gen: Generic[T]): Repr
Returns an
HList
containing the elements of this tuple. -
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 thatop
can consume/produce all the partial results of the appropriate types. -
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 thatop
can consume/produce all the partial results of the appropriate types. -
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 inS
. -
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 typeU
.The
Elem
suffix is here for consistency with the corresponding method name forHList
and should be removed when the latter is removed. -
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 typeU
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 typeU
returning both the replaced element and the updated tuple. Available only if there is evidence that this tuple has an element of typeU
. -
def
replaceType[U]: ReplaceTypeAux[U]
Replaces the first element of type
U
of this tuple with the supplied value of typeV
, returning both the replaced element and the updated tuple.Replaces the first element of type
U
of this tuple with the supplied value of typeV
, returning both the replaced element and the updated tuple. An explicit type argument must be provided forU
. Available only if there is evidence that this tuple has an element of typeU
. -
def
reverse(implicit reverse: Reverse[T]): ops.tuple.Reverse.Out
Reverses this tuple.
-
def
reverse_:::[U](u: U)(implicit prepend: ReversePrepend[U, T]): ops.tuple.ReversePrepend.Out
Prepend the reverse of the argument tuple to this tuple.
-
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.
-
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.
-
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 typeU
. -
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 typeU
. -
def
rotateLeft(n: Nat)(implicit rotateLeft: RotateLeft[T, N]): ops.tuple.RotateLeft.Out
Rotate this tuple left by N
-
def
rotateRight(n: Nat)(implicit rotateRight: RotateRight[T, N]): ops.tuple.RotateRight.Out
Rotate this tuple right by N
-
def
scanLeft[Z, P <: Poly](z: Z)(op: Poly)(implicit scanL: LeftScanner[T, Z, op.type]): ops.tuple.LeftScanner.Out
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 evidenceop
can consume/produce all the results of the appropriate types. -
def
scanRight[Z, P <: Poly](z: Z)(op: Poly)(implicit scanR: RightScanner[T, Z, op.type]): ops.tuple.RightScanner.Out
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 evidenceop
can consume/produce all the results of the appropriate types. -
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 typeU
. -
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.
-
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.
-
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 typeU
. -
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 typeU
. -
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
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.
-
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.
-
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.
-
def
to[M[_]](implicit toTraversable: ToTraversable[T, M]): Out
Converts this tuple to a
M
of elements typed as the least upper bound of the types of the elements of this tuple. -
def
toArray[Lub](implicit toTraversable: Aux[T, Array, Lub]): (toTraversable)#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 classCC
) which interacts badly with the invariance ofArray
s. -
def
toList[Lub](implicit toTraversable: Aux[T, List, Lub]): (toTraversable)#Out
Converts this tuple to a
List
of elements typed as the least upper bound of the types of the elements of this tuple. -
def
toSized[M[_]](implicit toSized: ToSized[T, M]): ops.tuple.ToSized.Out
Converts this tuple to a
M
of elements typed as the least upper bound of the types of the elements of this tuple. -
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
transpose(implicit transpose: Transposer[T]): ops.tuple.Transposer.Out
Transposes this tuple.
-
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.
-
def
unifySubtypes[B](implicit subtypeUnifier: SubtypeUnifier[T, B]): ops.tuple.SubtypeUnifier.Out
Returns a tuple with all elements that are subtypes of
B
typed asB
. -
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.
-
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
Replaces the
N
th element of thisTuple
with the result of calling the supplied function on it.Replaces the
N
th element of thisTuple
with the result of calling the supplied function on it. Available only if there is evidence that thisTuple
hasN
elements. -
def
updateWith[U]: UpdateWithAux[U]
Replaces the first element of type
U
of this tuple with the result of its transformation to aV
via the supplied function.Replaces the first element of type
U
of this tuple with the result of its transformation to aV
via the supplied function. Available only if there is evidence that this tuple has an element of typeU
. -
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. -
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 forN
. Available only if there is evidence that this tuple has at least n elements. -
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 typeU
.Replaces the first element of type
U
of this tuple with the supplied value, also of typeU
. Available only if there is evidence that this tuple has an element of typeU
.The
Elem
suffix is here for consistency with the corresponding method name forHList
and should be removed when the latter is removed. -
def
updatedType[U]: UpdatedTypeAux[U]
Replaces the first element of type
U
of this tuple with the supplied value of typeV
.Replaces the first element of type
U
of this tuple with the supplied value of typeV
. An explicit type argument must be provided forU
. Available only if there is evidence that this tuple has an element of typeU
. -
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
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.
-
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.
-
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.
-
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})
-
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.
-
def
zipWithIndex(implicit zipper: ZipWithIndex[T]): ops.tuple.ZipWithIndex.Out
Zips this tuple with its element indices, resulting in a tuple of tuples of the form ({element from input tuple}, {element index})