blob: 90212b3b5eed616e43d058e6c7203456cfcef5cc (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
/* __ *\
** ________ ___ / / ___ Scala API **
** / __/ __// _ | / / / _ | (c) 2003-2009, LAMP/EPFL **
** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\___/_/ |_/____/_/ | | **
** |/ **
\* */
// $Id: Sequence.scala 16092 2008-09-12 10:37:06Z nielsen $
package scalax.collection
import generic._
import immutable.Nil
/** Class <code>Sequence[A]</code> represents finite sequences of elements
* of type <code>A</code>.
*
* @author Martin Odersky
* @author Matthias Zenger
* @version 1.0, 16/07/2003
*/
trait Sequence[+A] extends OrderedIterable[A] with SizedIterable[A] with generic.covariant.SequenceTemplate[Sequence, A]
object Sequence extends covariant.SequenceFactory[Sequence] {
/** The empty sequence */
val empty : Sequence[Nothing] = immutable.Nil
type View[+UC[B] <: Sequence[B], A] = SequenceView[UC, A]
/** @deprecated use View instead
*/
@deprecated type Projection[A] = View[C, A] forSome { type C[+B] <: Sequence[B] }
/** @deprecated use Sequence(value) instead */
@deprecated def singleton[A](value: A) = Sequence(value)
/** Builds a singleton sequence.
*
* @deprecated use <code>Sequence(x)</code> instead.
*/
@deprecated def single[A](x: A) = singleton(x)
}
|