class SizedOps[A0, Repr, L <: Nat] extends AnyRef
Carrier for Sized
operations.
These operations are implemented here as extension methods of the minimal Sized
type to avoid issues that would
otherwise be caused by its covariance.
- Self Type
- SizedOps[A0, Repr, L]
- Alphabetic
- By Inheritance
- SizedOps
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new SizedOps(s: Sized[Repr, L], itl: IsTraversableLike[Repr] { type A = A0 })(implicit arg0: AdditiveCollection[Repr])
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
++[B >: A0, That, M <: Nat](that: Sized[That, M])(implicit sum: Sum[L, M], cbf: CanBuildFrom[Repr, B, That], convThat: (That) ⇒ GenTraversableLike[B, That], ev: AdditiveCollection[That]): Sized[That, Out]
Append the argument collection to this collection.
Append the argument collection to this collection. The resulting collection will be statically known to have m+n elements.
-
def
+:(elem: A0)(implicit cbf: CanBuildFrom[Repr, A0, Repr]): Sized[Repr, Succ[L]]
Prepend the argument element to this collection.
Prepend the argument element to this collection. The resulting collection will be statically known to have a size one greater than this collection.
-
def
:+(elem: A0)(implicit cbf: CanBuildFrom[Repr, A0, Repr]): Sized[Repr, Succ[L]]
Append the argument element to this collection.
Append the argument element to this collection. The resulting collection will be statically known to have a size one greater than this collection.
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
apply(n: Nat)(implicit diff: Diff[L, Succ[N]], ev: ToInt[N]): A0
Returns the nth element of this
Sized
.Returns the nth element of this
Sized
. Available only if there is evidence that thisSized
has at least n elements. -
def
apply[N <: Nat](implicit diff: Diff[L, Succ[N]], ev: ToInt[N]): A0
Returns the nth element of this
Sized
.Returns the nth element of this
Sized
. Available only if there is evidence that thisSized
has at least n elements. -
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
at(n: Nat)(implicit diff: Diff[L, Succ[N]], ev: ToInt[N]): A0
Returns the nth element of this
Sized
.Returns the nth element of this
Sized
. Available only if there is evidence that thisSized
has at least n elements. -
def
at[N <: Nat](implicit diff: Diff[L, Succ[N]], ev: ToInt[N]): A0
Returns the nth element of this
Sized
.Returns the nth element of this
Sized
. Available only if there is evidence that thisSized
has at least n elements. -
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
drop(m: Nat)(implicit diff: Diff[L, N], ev: ToInt[N]): Sized[Repr, Out]
Returns all but the first m elements of this collection.
Returns all but the first m elements of this collection. Available only if there is evidence that this collection has at least m elements. The resulting collection will be statically known to have m less elements than this collection.
-
def
drop[M <: Nat](implicit diff: Diff[L, M], ev: ToInt[M]): Sized[Repr, Out]
Returns all but the first m elements of this collection.
Returns all but the first m elements of this collection. An explicit type argument must be provided. Available only if there is evidence that this collection has at least m elements. The resulting collection will be statically known to have m less elements than this collection.
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
head(implicit ev: ops.nat.LT.<[Nat._0, L]): A0
Returns the head of this collection.
Returns the head of this collection. Available only if there is evidence that this collection has at least one element.
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
map[B, That](f: (A0) ⇒ B)(implicit cbf: CanBuildFrom[Repr, B, That], ev: AdditiveCollection[That]): Sized[That, L]
Map across this collection.
Map across this collection. The resulting collection will be statically known to have the same number of elements as this collection.
-
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
splitAt(m: Nat)(implicit diff: Diff[L, N], ev: ToInt[N]): (Sized[Repr, N], Sized[Repr, Out])
Splits this collection at the mth element, returning the prefix and suffix as a pair.
Splits this collection at the mth element, returning the prefix and suffix as a pair. Available only if there is evidence that this collection has at least m elements. The resulting collections will be statically know to have m and n-m elements respectively.
-
def
splitAt[M <: Nat](implicit diff: Diff[L, M], ev: ToInt[M]): (Sized[Repr, M], Sized[Repr, Out])
Splits this collection at the mth element, returning the prefix and suffix as a pair.
Splits this collection at the mth element, returning the prefix and suffix as a pair. An explicit type argument must be provided. Available only if there is evidence that this collection has at least m elements. The resulting collections will be statically know to have m and n-m elements respectively.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
tail(implicit pred: Pred[L]): Sized[Repr, Out]
Returns the tail of this collection.
Returns the tail of this collection. Available only if there is evidence that this collection has at least one element.
-
def
take(m: Nat)(implicit diff: Diff[L, N], ev: ToInt[N]): Sized[Repr, N]
Returns the first m elements of this collection.
Returns the first m elements of this collection. Available only if there is evidence that this collection has at least m elements. The resulting collection will be statically known to have m elements.
-
def
take[M <: Nat](implicit diff: Diff[L, M], ev: ToInt[M]): Sized[Repr, M]
Returns the first m elements of this collection.
Returns the first m elements of this collection. An explicit type argument must be provided. Available only if there is evidence that this collection has at least m elements. The resulting collection will be statically known to have m elements.
-
def
toHList(implicit hl: ToHList[Repr, L]): Out
Converts this
Sized
to anHList
whose elements have the same type as inRepr
. -
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
tupled[L0 <: HList, T](implicit hl: Aux[Repr, L, L0], t: ops.hlist.Tupler.Aux[L0, T]): T
Converts this
Sized
to a tuple whose elements have the same type as inRepr
. -
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( ... )