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
The number of elements in the 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, pushAll, pushAll, apply, iterator, stringPrefix
Methods inherited from Sequence
companion
Methods inherited from SequenceTemplate
lengthCompare, size, isDefinedAt, zip, zipAll, zipWithIndex, segmentLength, prefixLength, indexWhere, indexWhere, findIndexOf, indexOf, indexOf, lastIndexOf, lastIndexOf, lastIndexWhere, lastIndexWhere, reverse, reverseIterator, reversedElements, startsWith, startsWith, endsWith, indexOfSeq, indexOfSeq, lastIndexOfSeq, lastIndexOfSeq, contains, union, diff, intersect, removeDuplicates, patch, padTo, toSequence, indices, view, view, equals, toString, sortWith, findLastIndexOf, slice, equalsWith, containsSlice, projection
Methods inherited from PartialFunction
orElse, andThen
Methods inherited from Function1
compose
Methods inherited from IterableTemplate
elements, foreach, foldRight, reduceRight, toIterable, head, takeRight, dropRight, sameElements, toStream, 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, forall, exists, count, find, foldLeft, /:, :\, reduceLeft, reduceLeftOption, reduceRightOption, headOption, tail, last, lastOption, init, take, drop, slice, takeWhile, dropWhile, span, splitAt, copyToBuffer, copyToArray, copyToArray, toArray, toList, 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 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
The number of elements in the stack
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