scala.collection.immutable.Stack

class Node

[source: scala/collection/immutable/Stack.scala]

@serializable

protected class Node[+B >: A](elem : B)
extends Stack[B]
Method Summary
override def hashCode : Int
Returns the hash code for this stack.
override def isEmpty : Boolean
Checks if this stack is empty.
override def length : Int
Returns the size of this stack.
override def pop : Stack[B]
Removes the top element from the stack.
override def top : B
Returns the top element of the stack. An error is signaled if there is no element on the stack.
Methods inherited from Stack
+, push, push, +, push, ++, ++, apply, elements, reverse, equals, stringPrefix
Methods inherited from Seq
lengthCompare, size, concat, last, lastOption, first, firstOption, headOption, isDefinedAt, lastIndexOf, findIndexOf, indexOf, map, flatMap, filter, take, drop, slice, slice, takeWhile, dropWhile, contains, subseq, toArray, toSeq, projection, equalsWith, startsWith, startsWith, endsWith, indexOf, containsSlice
Methods inherited from Collection
toString
Methods inherited from Iterable
partition, foreach, forall, exists, find, foldLeft, foldRight, /:, :\, reduceLeft, reduceRight, copyToBuffer, sameElements, toList, toStream, mkString, mkString, mkString, addString, 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 isEmpty : Boolean
Checks if this stack is empty.
Returns
true, iff there is no element on the stack.
Overrides
Stack.isEmpty

override def length : Int
Returns the size of this stack.
Returns
the stack size.
Overrides
Stack.length

override def top : B
Returns the top element of the stack. An error is signaled if there is no element on the stack.
Returns
the top element.
Overrides
Stack.top

override def pop : Stack[B]
Removes the top element from the stack.
Returns
the new stack without the former top element.
Overrides
Stack.pop

override def hashCode : Int
Returns the hash code for this stack.
Returns
the hash code of the stack.
Overrides
Stack.hashCode