in scala
trait SeqProxy

trait SeqProxy[+A]()
extends Seq[A]
with ScalaObject
with IterableProxy[A]
Implementing classes or objects:
trait StackProxy[A]() in scala/collection/mutable
trait QueueProxy[A]() in scala/collection/mutable

Class Seq[A] represents finite sequences of elements of type A.
Author:
Martin Odersky, Matthias Zenger
Version:
1.0, 16/07/2003

Method Summary
  def apply(n: Int): A
     Access element number n.
override 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.
override def drop(n: Int): Seq[A]
     Returns a new sub-sequence that drops the first n elements of this sequence.
override def indexOf[B >: A](elem: B): Int
     Returns the index of the first occurence of the specified object in this sequence.
override def isDefinedAt(y: Int): Boolean
     Is this partial function defined for the index x?
override 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.
  def length: Int
     Returns the length of the sequence.
abstract def self: Seq[A]
override def subseq(from: Int, len: Int): Seq[A]
     Returns a subsequence starting from index from consisting of len elements.
override def take(n: Int): Seq[A]
     Returns the sub-sequence starting from index n.
override def toList: List[A]
     Transform this sequence into a list of all elements.

Methods inherited from java/lang/Object-class
clone, eq, finalize, getClass, ne, notify, notifyAll, synchronized, wait, wait, wait

Methods inherited from scala/Any-class
!=, ==, asInstanceOf, isInstanceOf, match

Methods inherited from scala/Iterable-class
concat

Methods inherited from scala/IterableProxy-class
/:, :\, elements, exists, find, foldLeft, foldRight, forall, foreach, sameElements

Methods inherited from scala/Proxy-class
equals, hashCode, toString

Methods inherited from scala/ScalaObject-class
getScalaType

Methods inherited from scala/Seq-class
concat, stringPrefix

Method Detail

self

  abstract def self: Seq[A]

length

  def length: Int
Returns the length of the sequence.
Returns:
the sequence length.

apply

  def apply(n: Int): A
Access element number n.
Returns:
the element at index n.

isDefinedAt

  override def isDefinedAt(y: Int): Boolean
Is this partial function defined for the index x?
Returns:
true, iff x is a legal sequence index.

indexOf

  override def indexOf[B >: A](elem: B): Int
Returns the index of the first occurence of the specified object in this sequence.
Parameters:
elem - element to search for.
Returns:
the index in this sequence of the first occurence of the specified element, or -1 if the sequence does not contain this element.

lastIndexOf

  override 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.
Parameters:
elem - element to search for.
Returns:
the index in this sequence of the last occurence of the specified element, or -1 if the sequence does not contain this element.

take

  override def take(n: Int): Seq[A]
Returns the sub-sequence starting from index n.

drop

  override def drop(n: Int): Seq[A]
Returns a new sub-sequence that drops the first n elements of this sequence.

subseq

  override def subseq(from: Int, len: Int): Seq[A]
Returns a subsequence starting from index from consisting of len elements.

copyToArray

  override 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.
Parameters:
xs - the array to fill.
start - starting index.
Returns:
the given array xs filled with the elements of this sequence.

toList

  override def toList: List[A]
Transform this sequence into a list of all elements.
Returns:
a list which enumerates all elements of this sequence.