|
Scala
1.3.0.7 |
|||
Seq[A] represents finite sequences of elements
of type A.
| Method Summary | |
def copyToArray[B >: A](xs: Array[B], start: Int): Array[B]
Fills the given array xs with the elements of
this sequence starting at position start.
|
|
def drop(n: Int): Seq[A]
Returns a new sub-sequence that drops the first n
elements of this sequence.
|
|
def indexOf[B >: A](elem: B): Int
Returns the index of the first occurence of the specified object in this sequence. |
|
def isDefinedAt(x: Int): Boolean
Is this partial function defined for the index x?
|
|
def lastIndexOf[B >: A](elem: B): 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: Int
Returns the length of the sequence. |
protected
|
def stringPrefix: String
Defines the prefix of the string representation. |
def subseq(from: Int, len: Int): Seq[A]
Returns a subsequence starting from index from
consisting of len elements.
|
|
def take(n: Int): Seq[A]
Returns the sub-sequence starting from index n.
|
|
def toList: List[A]
Transform this sequence into a list of all elements. |
|
override
|
def toString(): String
Customizes the toString method.
|
| Methods inherited from java/lang/Object-class |
| clone, eq, equals, finalize, getClass, hashCode, notify, notifyAll, synchronized, wait, wait, wait |
| Methods inherited from scala/Any-class |
| !=, ==, asInstanceOf, isInstanceOf, match |
| Methods inherited from scala/Function1-class |
| apply |
| Methods inherited from scala/Iterable-class |
| /:, :\, elements, exists, find, foldLeft, foldRight, forall, foreach, sameElements |
| Methods inherited from scala/ScalaObject-class |
| getType |
| Method Detail |
abstract def length: Int
def isDefinedAt(x: Int): Boolean
x?
x is a legal sequence index.
def indexOf[B >: A](elem: B): Int
elem -
element to search for.
def lastIndexOf[B >: A](elem: B): Int
elem -
element to search for.
def take(n: Int): Seq[A]
n.
def drop(n: Int): Seq[A]
n
elements of this sequence.
def subseq(from: Int, len: Int): Seq[A]
from
consisting of len elements.
def copyToArray[B >: A](xs: Array[B], start: Int): Array[B]
xs with the elements of
this sequence starting at position start.
xs -
the array to fill.
start -
starting index.
xs filled with this list.
def toList: List[A]
override def toString(): String
toString method.
protected def stringPrefix: String
|
Scala
1.3.0.7 |
|||