scalax.io.LongTraversableViewLike
Selects an element by its index in the $coll.
Selects an element by its index in the $coll.
The index to select.
the element of this $coll at index idx
, where 0
indicates the first element.
Tests whether this $coll contains a given sequence as a slice.
Tests whether this $coll contains a given sequence as a slice. $mayNotTerminateInf
the sequence to test
true
if this $coll contains a slice with the same elements
as that
, otherwise false
.
Tests whether this $coll contains a given sequence as a slice.
Tests whether this $coll contains a given sequence as a slice. $mayNotTerminateInf
the sequence to test
true
if this $coll contains a slice with the same elements
as that
, otherwise false
.
Tests whether every element of this $coll relates to the corresponding element of another sequence by satisfying a test predicate.
Tests whether every element of this $coll relates to the corresponding element of another sequence by satisfying a test predicate.
the type of the elements of that
the other sequence
the test predicate, which relates elements from both sequences
true
if both sequences have the same length and
p(x, y)
is true
for all corresponding elements x
of this $coll
and y
of that
, otherwise false
.
Tests whether every element of this $coll relates to the corresponding element of another sequence by satisfying a test predicate.
Tests whether every element of this $coll relates to the corresponding element of another sequence by satisfying a test predicate.
the type of the elements of that
the other sequence
the test predicate, which relates elements from both sequences
true
if both sequences have the same length and
p(x, y)
is true
for all corresponding elements x
of this $coll
and y
of that
, otherwise false
.
Partitions the data into fixed size blocks (same as sliding(size,size).
Partitions the data into fixed size blocks (same as sliding(size,size).
the number of elements per group
An LongTraversable producing Seqs of size size
, except the
last and the only element will be truncated if there are
fewer elements than size.
[use case] Finds index of first occurrence of some value in this $coll after or at some start index.
Finds index of first occurrence of some value in this $coll after or at some start index.
the element value to search for.
the start index
the index >= from
of the first element of this $coll that is equal (wrt ==
)
to elem
, or -1
, if none exists.
Finds index of first occurrence of some value in this $coll after or at some start index.
Finds index of first occurrence of some value in this $coll after or at some start index.
$mayNotTerminateInf
the type of the element elem
.
the element value to search for.
the start index
the index >= from
of the first element of this $coll that is equal (wrt ==
)
to elem
, or -1
, if none exists.
[use case] Finds index of first occurrence of some value in this $coll.
Finds index of first occurrence of some value in this $coll.
the element value to search for.
the index of the first element of this $coll that is equal (wrt ==
)
to elem
, or -1
, if none exists.
Finds index of first occurrence of some value in this $coll.
Finds index of first occurrence of some value in this $coll.
$mayNotTerminateInf
the type of the element elem
.
the element value to search for.
the index of the first element of this $coll that is equal (wrt ==
)
to elem
, or -1
, if none exists.
Finds first index after or at a start index where this $coll contains a given sequence as a slice.
Finds first index after or at a start index where this $coll contains a given sequence as a slice. $mayNotTerminateInf
the sequence to test
the start index
the first index >= from
such that the elements of this $coll starting at this index
match the elements of sequence that
, or -1
of no such subsequence exists.
Finds first index where this $coll contains a given sequence as a slice.
Finds first index where this $coll contains a given sequence as a slice. $mayNotTerminateInf
the sequence to test
the first index such that the elements of this $coll starting at this index
match the elements of sequence that
, or -1
of no such subsequence exists.
Finds index of the first element satisfying some predicate after or at some start index.
Finds index of the first element satisfying some predicate after or at some start index.
$mayNotTerminateInf
the predicate used to test elements.
the start index
the index >= from
of the first element of this $coll that satisfies the predicate p
,
or -1
, if none exists.
[use case] Finds index of last occurrence of some value in this $coll before or at a given end index.
Finds index of last occurrence of some value in this $coll before or at a given end index.
the element value to search for.
the end index.
the index <= end
of the last element of this $coll that is equal (wrt ==
)
to elem
, or -1
, if none exists.
Finds index of last occurrence of some value in this $coll before or at a given end index.
Finds index of last occurrence of some value in this $coll before or at a given end index.
the type of the element elem
.
the element value to search for.
the end index.
the index <= end
of the last element of this $coll that is equal (wrt ==
)
to elem
, or -1
, if none exists.
[use case] Finds index of last occurrence of some value in this $coll.
Finds index of last occurrence of some value in this $coll.
the element value to search for.
the index of the last element of this $coll that is equal (wrt ==
)
to elem
, or -1
, if none exists.
Finds index of last occurrence of some value in this $coll.
Finds index of last occurrence of some value in this $coll.
$willNotTerminateInf
the type of the element elem
.
the element value to search for.
the index of the last element of this $coll that is equal (wrt ==
)
to elem
, or -1
, if none exists.
Finds index of last element satisfying some predicate before or at given end index.
Finds index of last element satisfying some predicate before or at given end index.
Always takes linear time and traverses entire traversal
the predicate used to test elements.
the index <= end
of the last element of this $coll that satisfies the predicate p
,
or -1
, if none exists.
Finds index of last element satisfying some predicate.
Finds index of last element satisfying some predicate.
$willNotTerminateInf
the predicate used to test elements.
the index of the last element of this $coll that satisfies the predicate p
,
or -1
, if none exists.
The long equivalent of Traversable.
The long equivalent of Traversable.drop
A foldLeft operation that can be terminated without processing the entire collection.
A foldLeft operation that can be terminated without processing the entire collection.
Unlike a normal fold, the function passed to limitFold returns a FoldResult which both provides the value that is to be passed to the next stage of the fold as well as represents if the fold should continue or terminate.
the value to seed the operation with. IE the value that is passed as the accumulator for the first value of the fold operation
the operation that combines the current and previous versions. The input is the (acc,next) where acc is the result from the previous call and next is the next value in the collection to be processed. The return value of the op is Either Continue or End indicating if the process should continue to next element or terminate, returning the value contained in the result object
the last value contained in the FoldResult which was returned by op
The long equivalent of Traversable.
The long equivalent of Traversable.size
NOT recommended for use since it might trigger a full traversal of the traversable
The long equivalent of Traversable.
The long equivalent of Traversable.slice
The long equivalent of Traversable.
The long equivalent of Traversable.splitAt
The long equivalent of Traversable.
The long equivalent of Traversable.take
The long equivalent of Traversable.
The long equivalent of Traversable.view(from,to)
Boilerplate method, to override in each subclass This method could be eliminated if Scala had virtual classes
Boilerplate method, to override in each subclass This method could be eliminated if Scala had virtual classes
Boilerplate method, to override in each subclass This method could be eliminated if Scala had virtual classes
Boilerplate method, to override in each subclass This method could be eliminated if Scala had virtual classes
Returns the length of the longest prefix whose elements all satisfy some predicate.
Returns the length of the longest prefix whose elements all satisfy some predicate.
the predicate used to test elements.
the length of the longest prefix of this $coll
such that every element of the segment satisfies the predicate p
.
Computes length of longest segment whose elements all satisfy some predicate.
Computes length of longest segment whose elements all satisfy some predicate.
the predicate used to test elements.
the index where the search starts.
the length of the longest segment of this $coll starting from index from
such that every element of the segment satisfies the predicate p
.
Groups elements in fixed size blocks by passing a "sliding window" over them.
Groups elements in fixed size blocks by passing a "sliding window" over them.
This is based on Iterator#sliding but does not return an iterator to ensure that a resource is not left open.
the number of elements per group
the distance between the first elements of successive groups (defaults to 1)
An LongTraversable producing Seqs of size size
, except the
last and the only element will be truncated if there are
fewer elements than size.
Tests whether this $coll starts with the given sequence.
Tests whether this $coll starts with the given sequence.
the sequence to test
true
if this collection has that
as a prefix, false
otherwise.
Tests whether this $coll contains the given sequence at a given index.
Tests whether this $coll contains the given sequence at a given index.
If the both the receiver object, this
and
the argument, that
are infinite sequences
this method may not terminate.
the sequence to test
the index where the sequence is searched.
true
if the sequence that
is contained in this $coll at index offset
,
otherwise false
.
Tests whether this $coll starts with the given sequence.
Tests whether this $coll starts with the given sequence.
the sequence to test
true
if this collection has that
as a prefix, false
otherwise.
Tests whether this $coll contains the given sequence at a given index.
Tests whether this $coll contains the given sequence at a given index.
If the both the receiver object, this
and
the argument, that
are infinite sequences
this method may not terminate.
the sequence to test
the index where the sequence is searched.
true
if the sequence that
is contained in this $coll at index offset
,
otherwise false
.
Returns a $coll formed from this $coll and another iterable collection by combining corresponding elements in pairs.
Returns a $coll formed from this $coll and another iterable collection by combining corresponding elements in pairs. If one of the two collections is longer than the other, its remaining elements are ignored.
the type of the first half of the returned pairs (this is always a supertype
of the collection's element type A
).
the type of the second half of the returned pairs
$zipthatinfo
The iterable providing the second half of each result pair
$zipbfinfo
a new collection of type That
containing pairs consisting of
corresponding elements of this $coll and that
. The length
of the returned collection is the minimum of the lengths of this $coll and that
.
Returns a $coll formed from this $coll and another iterable collection by combining corresponding elements in pairs.
Returns a $coll formed from this $coll and another iterable collection by combining corresponding elements in pairs. If one of the two collections is longer than the other, its remaining elements are ignored.
the type of the first half of the returned pairs (this is always a supertype
of the collection's element type A
).
the type of the second half of the returned pairs
$zipthatinfo
The iterable providing the second half of each result pair
$zipbfinfo
a new collection of type That
containing pairs consisting of
corresponding elements of this $coll and that
. The length
of the returned collection is the minimum of the lengths of this $coll and that
.
Returns a $coll formed from this $coll and another iterable collection by combining corresponding elements in pairs.
Returns a $coll formed from this $coll and another iterable collection by combining corresponding elements in pairs. If one of the two collections is shorter than the other, placeholder elements are used to extend the shorter collection to the length of the longer.
$orderDependent
the iterable providing the second half of each result pair
the element to be used to fill up the result if this $coll is shorter than that
.
the element to be used to fill up the result if that
is shorter than this $coll.
a new collection of type That
containing pairs consisting of
corresponding elements of this $coll and that
. The length
of the returned collection is the maximum of the lengths of this $coll and that
.
If this $coll is shorter than that
, thisElem
values are used to pad the result.
If that
is shorter than this $coll, thatElem
values are used to pad the result.
Returns a $coll formed from this $coll and another iterable collection by combining corresponding elements in pairs.
Returns a $coll formed from this $coll and another iterable collection by combining corresponding elements in pairs. If one of the two collections is shorter than the other, placeholder elements are used to extend the shorter collection to the length of the longer.
$orderDependent
the iterable providing the second half of each result pair
the element to be used to fill up the result if this $coll is shorter than that
.
the element to be used to fill up the result if that
is shorter than this $coll.
a new collection of type That
containing pairs consisting of
corresponding elements of this $coll and that
. The length
of the returned collection is the maximum of the lengths of this $coll and that
.
If this $coll is shorter than that
, thisElem
values are used to pad the result.
If that
is shorter than this $coll, thatElem
values are used to pad the result.
Zips this $coll with its indices.
Zips this $coll with its indices.
$orderDependent
the type of the first half of the returned pairs (this is always a supertype
of the collection's element type A
).
the class of the returned collection. Where possible, That
is
the same class as the current collection class Repr
, but this
depends on the element type (A1, Int)
being admissible for that class,
which means that an implicit instance of type CanBuildFrom[Repr, (A1, Int), That]
.
is found.
A new collection of type That
containing pairs consisting of all elements of this
$coll paired with their index. Indices start at 0
.