in scala
class ::

final case class ::[b](hd: b, tl: List[b])
extends List[b]
with ScalaObject
with CaseClass
with java.io.Serializable

A non empty list characterized by a head and a tail.
Author:
Martin Odersky
Version:
1.0, 15/07/2003

Field Summary
final val hd: b
final val tl: List[b]

Method Summary
final def head: b
     Returns this first element of the list.
final def isEmpty: Boolean
     Returns true if the list does not contain any elements.
final def tail: List[b]
     Returns this list without its first element.

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

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

Methods inherited from scala/CaseClass-class
caseArity, caseElement

Methods inherited from scala/Iterable-class
/:, :\, sameElements

Methods inherited from scala/List-class
::, :::, apply, break, contains, count, diff, drop, dropRight, dropWhile, elements, exists, filter, find, flatMap, foldLeft, foldRight, forall, foreach, indices, init, intersect, last, length, map, mkString, partition, reduceLeft, reduceRight, remove, removeDuplicates, reverse, reverseMap, reverse_:::, sort, span, splitAt, take, takeRight, takeWhile, toString, union, zip

Methods inherited from scala/Seq-class
copyToArray, indexOf, isDefinedAt, lastIndexOf, stringPrefix, subseq, toList

Field Detail

hd

  final val hd: b

tl

  final val tl: List[b]
Method Detail

isEmpty

  final def isEmpty: Boolean
Returns true if the list does not contain any elements.
Returns:
true, iff the list is empty.

head

  final def head: b
Returns this first element of the list.
Returns:
the first element of this list.
Throws:
java.lang.RuntimeException if the list is empty.

tail

  final def tail: List[b]
Returns this list without its first element.
Returns:
this list without its first element.
Throws:
java.lang.RuntimeException if the list is empty.