|
Scala 2
|
||
class
Seq
[ A ]
extends
java.lang.Object with
PartialFunction with
Iterable with
ScalaObjectSeq[A] represents finite sequences of elements
of type A.| Def Summary | |
def
concat
[ A <: B& ]
( that : Seq )
: Seq
Returns the concatenation of two sequences. |
|
def
copyToArray
[ A <: B& ]
( xs : Array , start : scala.Int )
: Array
Fills the given array xs with the elements of
this sequence starting at position start.
|
|
def
drop
( n : scala.Int )
: Seq
Returns a new sub-sequence that drops the first n
elements of this sequence.
|
|
def
indexOf
[ A <: B& ]
( elem : B& )
: scala.Int
Returns the index of the first occurence of the specified object in this sequence. |
|
def
isDefinedAt
( x : scala.Int )
: scala.Boolean
Is this partial function defined for the index x?
|
|
def
lastIndexOf
[ A <: B& ]
( 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. |
|
def
length
: scala.Int
Returns the length of the sequence. |
|
def
mkString
( start : java.lang.String , sep : java.lang.String , end : java.lang.String )
: java.lang.String
Returns a string representation of this sequence. The resulting string begins with the string start and is finished by the string
end. Inside, the string representations of elements (w.r.t.
the method toString()) are separated by the string
sep.
Ex: List(1, 2, 3).mkString("(", "; ", ")") = "(1; 2; 3)"
|
|
protected
|
def
stringPrefix
: java.lang.String
Defines the prefix of the string representation. |
def
subseq
( from : scala.Int , len : scala.Int )
: Seq
Returns a subsequence starting from index from
consisting of len elements.
|
|
def
take
( n : scala.Int )
: Seq
Returns the sub-sequence starting from index n.
|
|
def
toList
: List
Transform this sequence into a list of all elements. |
|
override
|
def
toString
: java.lang.String
Customizes the toString method.
|
| Def Detail |
def
concat
[ A <: B& ]( that : Seq ) : Seq
def
copyToArray
[ A <: B& ]( xs : Array , start : scala.Int ) : Array
xs with the elements of
this sequence starting at position start.xs filled with this list.def
drop
( n : scala.Int ) : Seq
n
elements of this sequence.def
indexOf
[ A <: B& ]( elem : B& ) : scala.Int
def
isDefinedAt
( x : scala.Int ) : scala.Boolean
x?x is a legal sequence index.def
lastIndexOf
[ A <: B& ]( elem : B& ) : scala.Int
def
length
: scala.Int
def
mkString
( start : java.lang.String , sep : java.lang.String , end : java.lang.String ) : java.lang.String
start and is finished by the string
end. Inside, the string representations of elements (w.r.t.
the method toString()) are separated by the string
sep.
Ex: List(1, 2, 3).mkString("(", "; ", ")") = "(1; 2; 3)"def
stringPrefix
: java.lang.String
def
subseq
( from : scala.Int , len : scala.Int ) : Seq
from
consisting of len elements.def
take
( n : scala.Int ) : Seq
n.def
toList
: List
def
toString
: java.lang.String
toString method.