Scala Library
|
|
trait
IndexedSeqView[A, +Coll]
extends
IndexedSeqView[A, Coll] with
AnyRefMethod Summary | |
override def
|
drop
(n : Int) : IndexedSeqView[A, Coll]
Returns this traversable without its
n first elements
If this traversable has less than n elements, the empty
traversable is returned. |
override def
|
dropWhile
(p : (A) => Boolean) : IndexedSeqView[A, Coll]
Returns the longest suffix of this traversable whose first element
does not satisfy the predicate
p . |
override def
|
filter
(p : (A) => Boolean) : IndexedSeqView[A, Coll]
Returns all the elements of this traversable that satisfy the
predicate
p . The order of the elements is preserved. |
override def
|
init
: IndexedSeqView[A, Coll]
a traversable consisting of all elements of this traversable except the last one.
|
protected override def
|
newDroppedWhile (p : (A) => Boolean) : Transformed[A] |
protected override def
|
newFiltered
(p : (A) => Boolean) : Transformed[A]
Boilerplate method, to override in each subclass
This method could be eliminated if Scala had virtual classes
|
protected override def
|
newReversed : Transformed[A] |
protected override def
|
newSliced (_from : Int, _until : Int) : Transformed[A] |
protected override def
|
newTakenWhile (p : (A) => Boolean) : Transformed[A] |
override def
|
reverse
: IndexedSeqView[A, Coll]
A sequence of type
C consisting of all elements of
this sequence in reverse order. |
override def
|
slice
(from : Int, until : Int) : IndexedSeqView[A, Coll]
A sub-iterable starting at index `from`
and extending up to (but not including) index `until`.
|
override def
|
span
(p : (A) => Boolean) : (IndexedSeqView[A, Coll], IndexedSeqView[A, Coll])
Returns a pair consisting of the longest prefix of the traversable whose
elements all satisfy the given predicate, and the rest of the traversable.
|
override def
|
splitAt
(n : Int) : (IndexedSeqView[A, Coll], IndexedSeqView[A, Coll])
Split the traversable at a given point and return the two parts thus
created.
|
override def
|
take
(n : Int) : IndexedSeqView[A, Coll]
Return an iterable consisting only of the first
n
elements of this iterable, or else the whole iterable, if it has less
than n elements. |
override def
|
takeWhile
(p : (A) => Boolean) : IndexedSeqView[A, Coll]
Returns the longest prefix of this iterable whose elements satisfy
the predicate
p . |
abstract def
|
update (idx : Int, elem : A) : Unit |
Methods inherited from IndexedSeqViewLike | |
newAppended, newMapped, newFlatMapped, newZipped, newZippedAll, newPatched, stringPrefix |
Methods inherited from SeqViewLike | |
patch, padTo |
Methods inherited from IterableViewLike | |
zip, zipWithIndex, zipAll |
Methods inherited from TraversableViewLike | |
underlying (abstract), newBuilder, force, ++, ++, map, flatMap |
Methods inherited from IndexedSeq | |
companion |
Methods inherited from IndexedSeqLike | |
thisCollection, toCollection, iterator, isEmpty, foreach, forall, exists, find, foldLeft, foldRight, reduceLeft, reduceRight, head, tail, last, takeRight, dropRight, sameElements, copyToArray, lengthCompare, segmentLength, indexWhere, lastIndexWhere, reverseIterator, startsWith, endsWith, view, view |
Methods inherited from SeqLike | |
length (abstract), apply (abstract), size, isDefinedAt, prefixLength, indexWhere, findIndexOf, indexOf, indexOf, lastIndexOf, lastIndexOf, lastIndexWhere, reverseMap, reversedElements, startsWith, indexOfSeq, indexOfSeq, lastIndexOfSeq, lastIndexOfSeq, contains, union, diff, intersect, removeDuplicates, updated, +:, :+, sortWith, sortWith, sortBy, toSeq, indices, hashCode, equals, toString, findLastIndexOf, equalsWith, containsSlice, projection |
Methods inherited from IterableLike | |
elements, toIterable, toStream, canEqual, first, firstOption |
Methods inherited from GenericTraversableTemplate | |
genericBuilder, unzip, flatten, transpose |
Methods inherited from TraversableLike | |
repr, nonEmpty, hasDefiniteSize, filterNot, partialMap, remove, partition, groupBy, count, /:, :\, reduceLeftOption, reduceRightOption, sum, product, min, max, headOption, lastOption, copyToBuffer, copyToArray, toArray, toList, toIndexedSeq, toSet, mkString, mkString, mkString, addString, addString, addString, withFilter |
Methods inherited from PartialFunction | |
orElse, andThen |
Methods inherited from Function1 | |
compose |
Methods inherited from AnyRef | |
getClass, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
Methods inherited from Any | |
==, !=, isInstanceOf, asInstanceOf |
Class Summary | |
trait
|
DroppedWhile
extends Transformed[A] with DroppedWhile
|
trait
|
Filtered
extends Transformed[A] with Filtered
|
trait
|
Reversed
extends Transformed[A] with Reversed
|
trait
|
Sliced
extends Transformed[A] with Sliced
pre: from >= 0
|
trait
|
TakenWhile
extends Transformed[A] with TakenWhile
|
trait
|
Transformed
[B] extends IndexedSeqView[B, Coll] with Transformed[B]
|
Method Details |
protected override
def
newFiltered(p : (A) => Boolean) : Transformed[A]
protected override
def
newSliced(_from : Int, _until : Int) : Transformed[A]
protected override
def
newDroppedWhile(p : (A) => Boolean) : Transformed[A]
protected override
def
newTakenWhile(p : (A) => Boolean) : Transformed[A]
protected override
def
newReversed : Transformed[A]
override
def
filter(p : (A) => Boolean) : IndexedSeqView[A, Coll]
p
. The order of the elements is preserved.p -
the predicate used to filter the traversable.p
.override
def
init : IndexedSeqView[A, Coll]
override
def
drop(n : Int) : IndexedSeqView[A, Coll]
n
first elements
If this traversable has less than n
elements, the empty
traversable is returned.n -
the number of elements to dropoverride
def
take(n : Int) : IndexedSeqView[A, Coll]
n
elements of this iterable, or else the whole iterable, if it has less
than n
elements.n -
the number of elements to takeoverride
def
slice(from : Int, until : Int) : IndexedSeqView[A, Coll]
from -
The index of the first element of the returned subsequenceuntil -
The index of the element following the returned subsequenceoverride
def
dropWhile(p : (A) => Boolean) : IndexedSeqView[A, Coll]
p
.p -
the test predicate.override
def
takeWhile(p : (A) => Boolean) : IndexedSeqView[A, Coll]
p
.p -
the test predicate.override
def
span(p : (A) => Boolean) : (IndexedSeqView[A, Coll], IndexedSeqView[A, Coll])
p -
the test predicatep
, and the rest of the traversable.override
def
splitAt(n : Int) : (IndexedSeqView[A, Coll], IndexedSeqView[A, Coll])
n -
the position at which to splitn
elements, and the other elements.override
def
reverse : IndexedSeqView[A, Coll]
C
consisting of all elements of
this sequence in reverse order.
Scala Library
|
|