|
Scala 2.3.3.10048
|
abstract
trait
Seq
[+A]
extends
java.lang.Object
with
scala.PartialFunction[scala.Int, A]
with
scala.Iterable[A]
with
scala.ScalaObject
Seq[A]
represents finite sequences of elements
of type A
.Def Summary | |
override
|
def
++
[B >: A]
(that: scala.Iterable[B])
: scala.Seq[B]
Appends two iterable objects. |
override
|
def
concat
[B >: A]
(that: scala.Iterable[B])
: scala.Seq[B]
Appends two iterable objects. |
def
contains
(elem: scala.Any)
: scala.Boolean
Tests if the given value elem is a member of this
sequence.
|
|
def
copyToArray
[B >: A]
(xs: scala.Array[B], start: scala.Int)
: scala.Unit
Fills the given array xs with the elements of
this sequence starting at position start .
|
|
override
|
def
drop
(n: scala.Int)
: scala.Seq[A]
Returns this sequence without its n first elements
If this sequence has less than n elements, the empty
sequence is returned.
|
override
|
def
dropWhile
(p: (A) => scala.Boolean)
: scala.Seq[A]
Returns the longest suffix of this sequence whose first element does not satisfy the predicate p .
|
override
|
def
filter
(p: (A) => scala.Boolean)
: scala.Seq[A]
Returns all the elements of this sequence that satisfy the predicate p . The order of the elements is preserved.
|
override
|
def
flatMap
[B]
(f: (A) => scala.Iterable[B])
: scala.Seq[B]
Applies the given function f to each element of
this sequence, then concatenates the results.
|
def
isDefinedAt
(x: scala.Int)
: scala.Boolean
Is this partial function defined for the index x ?
|
|
def
isEmpty
: scala.Boolean
Returns true if length == 0 |
|
def
lastIndexOf
[B >: A]
(elem: B)
: scala.Int
Returns the index of the last occurence of the specified element in this sequence, or -1 if the sequence does not contain this element. |
|
abstract
|
def
length
: scala.Int
Returns the length of the sequence. |
override
|
def
map
[B]
(f: (A) => B)
: scala.Seq[B]
Returns the sequence resulting from applying the given function f to each element of this sequence.
|
def
reverse
: scala.Seq[A]
A sequence consisting of all elements of this sequence in reverse order. |
|
def
slice
(from: scala.Int, len: scala.Int)
: scala.Seq[A]
Returns a subsequence starting from index from
consisting of len elements.
|
|
protected
|
def
stringPrefix
: java.lang.String
Defines the prefix of the string representation. |
def
subseq
(from: scala.Int, end: scala.Int)
: scala.Seq[A]
Returns a subsequence starting from index from
consisting of len elements.
|
|
override
|
def
take
(n: scala.Int)
: scala.Seq[A]
Returns a sequence consisting only over the first n
elements of this sequence, or else the whole sequence, if it has less
than n elements.
|
override
|
def
takeWhile
(p: (A) => scala.Boolean)
: scala.Seq[A]
Returns the longest prefix of this sequence whose elements satisfy the predicate p .
|
def
toArray
[B >: A]
: scala.Array[B]
Converts this sequence to a fresh Array with length elements.
|
|
override
|
def
toString
: java.lang.String
Customizes the toString method.
|
Def inherited from scala.PartialFunction[scala.Int, A] | |
andThen , isDefinedAt, orElse |
Def inherited from scala.Iterable[A] | |
++ , /:, :\, addString, concat, copyToBuffer, drop, dropWhile, elements, exists, filter, find, findIndexOf, flatMap, foldLeft, foldRight, forall, foreach, indexOf, map, mkString, mkString, reduceLeft, reduceRight, sameElements, take, takeWhile, toList |
Def Detail |
override
def
++
[B >: A](that: scala.Iterable[B]): scala.Seq[B]
that -
..
override
def
concat
[B >: A](that: scala.Iterable[B]): scala.Seq[B]
++
instead
def
contains
(elem: scala.Any): scala.Boolean
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
.
def
copyToArray
[B >: A](xs: scala.Array[B], start: scala.Int): scala.Unit
xs
with the elements of
this sequence starting at position start
.xs -
the array to fill.
start -
starting index.
n
first elements
If this sequence has less than n
elements, the empty
sequence is returned.n -
the number of elements to drop
override
def
dropWhile
(p: (A) => scala.Boolean): scala.Seq[A]
p
.p -
the test predicate.
p
.
override
def
filter
(p: (A) => scala.Boolean): scala.Seq[A]
p
. The order of the elements is preserved.p -
the predicate used to filter the list.
p
.
override
def
flatMap
[B](f: (A) => scala.Iterable[B]): scala.Seq[B]
f
to each element of
this sequence, then concatenates the results.f -
the function to apply on each element.
f(a0) ::: ... ::: f(an)
if this sequence is a0, ..., an
.
def
isDefinedAt
(x: scala.Int): scala.Boolean
x
?x -
..
true
, iff x
is a legal sequence index.
def
isEmpty
: scala.Boolean
elem -
element to search for.
abstract
def
length
: scala.Int
f
to each element of this sequence.f -
function to apply to each element.
f(a0), ..., f(an)
if this sequence is a0, ..., an
.
from
consisting of len
elements.from -
..
len -
..
protected
def
stringPrefix
: java.lang.String
def
subseq
(from: scala.Int, end: scala.Int): scala.Seq[A]
from
consisting of len
elements.slice
instead
n
elements of this sequence, or else the whole sequence, if it has less
than n
elements.n -
the number of elements to take
override
def
takeWhile
(p: (A) => scala.Boolean): scala.Seq[A]
p
.p -
the test predicate.
p
.
def
toArray
[B >: A]: scala.Array[B]
length
elements.
override
def
toString
: java.lang.String
toString
method.