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 final def
|
productArity
: Int
return k for a product
A(x_1,...,x_k)) |
override final def
|
productElement
(arg0 : Int) : Any
for a case class
A(x_1,...,x_k)) , returns x_(i+1)
for 0 <= i < k |
override final 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 Product | |
element, arity |
Methods inherited from RandomAccessSeq | |
projection, elements, drop, take, slice, reverse, patch, ++, toStream, safeIs |
Methods inherited from Seq | |
lengthCompare, size, isEmpty, concat, last, lastOption, headOption, lastIndexOf, map, flatMap, filter, takeWhile, dropWhile, contains, subseq, toArray, 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 final
def
productPrefix : java.lang.String
override final
def
productArity : Int
A(x_1,...,x_k))
A(x_1,...,x_k))
, returns x_(i+1)
for 0 <= i < k
n -
the position of the n-th elementIndexOutOfBoundsException -
Scala Library Documentation
|
|