Scala Library
|
|
trait
SeqForwarder[+A]
extends
Seq[A] with
IterableForwarder[A]Method Summary | |
override def
|
apply
(i : Int) : A
Returns the elements at position `idx`
|
override def
|
contains
(elem : Any) : Boolean
Tests if the given value
elem is a member of this
sequence. |
override def
|
endsWith [B](that : Seq[B]) : Boolean |
override def
|
indexOf
[B >: A](elem : B, from : Int) : Int
Returns the index of the first occurence of the specified
object in this sequence, starting from a start index, or
-1, if none exists.
|
override def
|
indexOfSeq [B >: A](that : Seq[B]) : Int |
override def
|
indexWhere
(p : (A) => Boolean, from : Int) : Int
Returns index of the first element starting from a start index
satisying a predicate, or -1, if none exists.
|
override def
|
indices
: Range
The range of all indices of this sequence.
|
override def
|
isDefinedAt
(x : Int) : Boolean
Is this partial function defined for the index
x ? |
override def
|
length
: Int
Returns the length of the sequence.
|
override def
|
lengthCompare
(l : Int) : Int
Result of comparing
length with operand len .
returns x where
x < 0 iff this.length < len
x == 0 iff this.length == len
x > 0 iff this.length > len .
The method as implemented here does not call length directly; its running time
is O(length min len) instead of O(length). The method should be overwritten
if computing length is cheap. |
override def
|
prefixLength
(p : (A) => Boolean) : Int
Returns length of longest prefix of this seqence
such that every element of the prefix satisfies predicate `p`.
|
override def
|
reverseIterator
: Iterator[A]
The elements of this sequence in reversed order
|
override def
|
segmentLength
(p : (A) => Boolean, from : Int) : Int
Returns length of longest segment starting from a start index `from`
such that every element of the segment satisfies predicate `p`.
|
override def
|
startsWith
[B](that : Seq[B], offset : Int) : Boolean
Checks whether the argument sequence is contained at the
specified index within the receiver object.
If the both the receiver object,
this and
the argument, that are infinite sequences
this method may not terminate. |
protected override abstract def
|
underlying
: Seq[A]
The iterable object to which calls are forwarded
|
Methods inherited from IterableForwarder | |
iterator, sameElements |
Methods inherited from TraversableForwarder | |
isEmpty, nonEmpty, hasDefiniteSize, foreach, forall, exists, count, find, foldLeft, foldRight, reduceLeft, reduceRight, reduceLeftOption, reduceRightOption, copyToBuffer, copyToArray, toArray, toList, toSeq, toStream, mkString, addString, head, last, lastOption |
Methods inherited from Seq | |
companion |
Methods inherited from SeqLike | |
thisCollection, toCollection, size, indexWhere, findIndexOf, indexOf, lastIndexOf, lastIndexOf, lastIndexWhere, lastIndexWhere, reverse, reverseMap, reversedElements, startsWith, indexOfSeq, lastIndexOfSeq, lastIndexOfSeq, union, diff, intersect, removeDuplicates, patch, updated, +:, :+, padTo, sortWith, sortWith, sortBy, view, view, hashCode, equals, toString, findLastIndexOf, equalsWith, containsSlice, projection |
Methods inherited from IterableLike | |
elements, toIterable, take, slice, takeWhile, takeRight, dropRight, zip, zipAll, zipWithIndex, canEqual, first, firstOption |
Methods inherited from GenericTraversableTemplate | |
newBuilder, genericBuilder, unzip, flatten, transpose |
Methods inherited from TraversableLike | |
repr, ++, ++, map, flatMap, filter, filterNot, partialMap, remove, partition, groupBy, /:, :\, sum, product, min, max, headOption, tail, init, drop, dropWhile, span, splitAt, copyToArray, toIndexedSeq, toSet, mkString, mkString, addString, addString, stringPrefix, 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 |
Method Details |
x
?override
def
length : Int
length
with operand len
.
returns x
where
x < 0
iff this.length < len
x == 0
iff this.length == len
x > 0
iff this.length > len
.
The method as implemented here does not call length directly; its running time
is O(length min len) instead of O(length). The method should be overwritten
if computing length is cheap.p -
the predicatefrom -
the start indexp -
the predicatep -
the predicatefrom -
the start indexelem -
element to search for.this
and
the argument, that
are infinite sequences
this method may not terminate.that
is contained in this
, at the specified index, otherwise falsethat
not contained in this, otherwise the first index where that
is contained.elem
is a member of this
sequence.elem -
element whose membership has to be tested.true
iff there is an element of this sequence which is equal (w.r.t. ==
) to elem
.override
def
indices : Range
Scala Library
|
|