Scala Library
|
|
scala/collection/immutable/::.scala
]
case final
class
::[B](private
hd : B, val
tl : List[B])
extends
List[B]Method Summary | |
override def
|
canEqual
(arg0 : Any) : Boolean
An equality helper method to assist in maintaining reflexivity
in the face of subtyping. For more, see
http://www.artima.com/lejava/articles/equality.html
|
override def
|
head
: B
Returns this first element of the list.
|
override def
|
isEmpty
: Boolean
Returns true if the list does not contain any elements.
|
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.
|
override def
|
tail
: List[B]
Returns this list without its first element.
|
Methods inherited from List | |
companion, ::, :::, reverse_:::, reverseMap, mapConserve, ++, ++, toList, take, drop, slice, takeRight, splitAt, takeWhile, dropWhile, span, reverse, stringPrefix, toStream, --, -, sort |
Methods inherited from Product | |
productIterator, productElements |
Methods inherited from LinearSequenceTemplate | |
length, apply, iterator, foreach, forall, exists, count, find, foldLeft, foldRight, reduceLeft, reduceRight, last, dropRight, sameElements, lengthCompare, isDefinedAt, segmentLength, indexWhere, lastIndexWhere, equals |
Methods inherited from Sequence | |
hashCode |
Methods inherited from SequenceTemplate | |
size, zip, zipAll, zipWithIndex, prefixLength, indexWhere, findIndexOf, indexOf, indexOf, lastIndexOf, lastIndexOf, lastIndexWhere, reverseIterator, reversedElements, startsWith, startsWith, endsWith, indexOfSeq, indexOfSeq, lastIndexOfSeq, lastIndexOfSeq, contains, union, diff, intersect, removeDuplicates, patch, padTo, toSequence, indices, view, view, toString, sortWith, findLastIndexOf, slice, equalsWith, containsSlice, projection |
Methods inherited from PartialFunction | |
orElse, andThen |
Methods inherited from Function1 | |
compose |
Methods inherited from IterableTemplate | |
elements, toIterable, first, firstOption, toSeq |
Methods inherited from TraversableClass | |
newBuilder, genericBuilder, unzip, flatten, transpose |
Methods inherited from TraversableTemplate | |
thisCollection, nonEmpty, hasDefiniteSize, map, flatMap, filter, filterMap, filterNot, remove, partition, groupBy, /:, :\, reduceLeftOption, reduceRightOption, headOption, lastOption, init, copyToBuffer, copyToArray, copyToArray, toArray, toSet, mkString, mkString, mkString, addString, addString, addString |
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
head : B
override
def
isEmpty : Boolean
true
, iff the list is empty.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
|
|