Scala Library Documentation
|
|
scala/Seq.scala
]
case
class
singleton[A](val
value : A)
extends
RandomAccessSeq[A] with
ProductMethod Summary | |
override def
|
apply (idx : Int) : A |
override def
|
equals (arg0 : Any) : Boolean |
override def
|
hashCode : Int |
override def
|
isDefinedAt
(idx : Int) : Boolean
Is this partial function defined for the index
x ? |
override def
|
length
: Int
Returns the length of the sequence.
|
override def
|
productArity
: Int
return k for a product
A(x_1,...,x_k) |
override def
|
productElement
(arg0 : Int) : Any
for a product
A(x_1,...,x_k) , returns x_(n+1)
for 0 <= n < k |
override def
|
productPrefix
: java.lang.String
By default the empty string. Implementations may override this
method in order to prepend a string prefix to the result of the
toString methods.
|
Methods inherited from RandomAccessSeq | |
projection, elements, drop, take, slice, reverse, patch, ++, toStream, safeIs |
Methods inherited from Seq | |
lengthCompare, size, isEmpty, concat, last, lastOption, first, firstOption, headOption, lastIndexOf, map, flatMap, filter, slice, takeWhile, dropWhile, contains, subseq, toArray, toSeq, equalsWith, startsWith, endsWith, indexOf, containsSlice |
Methods inherited from Collection | |
toString, stringPrefix |
Methods inherited from Iterable | |
partition, foreach, forall, exists, find, findIndexOf, indexOf, foldLeft, foldRight, /:, :\, reduceLeft, reduceRight, copyToBuffer, sameElements, toList, mkString, mkString, mkString, addString, addString, copyToArray, hasDefiniteSize |
Methods inherited from PartialFunction | |
orElse, andThen |
Methods inherited from Function1 | |
compose |
Methods inherited from AnyRef | |
getClass, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
Methods inherited from Any | |
==, !=, isInstanceOf, asInstanceOf |
Method Details |
override
def
length : Int
x
?x -
..true
, iff x
is a legal sequence index.override
def
hashCode : Int
override
def
productPrefix : java.lang.String
override
def
productArity : Int
A(x_1,...,x_k)
A(x_1,...,x_k)
, returns x_(n+1)
for 0 <= n < k
n -
the index of the element to returnIndexOutOfBoundsException -
n
elements after the first element
Scala Library Documentation
|
|