|
Scala
1.2.0.1 |
|||
Method Summary | |
override
|
def +[C >: B](elem: C): Stack[C]
Push an element on the stack. |
override
|
def +[C >: B](elems: Iterable[C]): Stack[C]
Push all elements provided by the given iterable object onto the stack. |
override
|
def apply(n: Int): B
Returns the n-th element of this stack. |
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 toList: List[B]
Creates a list of all stack elements in LIFO order. |
override
|
def top: B
Returns the top element of the stack. |
Methods inherited from java/lang/Object-class |
clone, eq, finalize, getClass, notify, notifyAll, synchronized, wait, wait, wait |
Methods inherited from scala/Any-class |
!=, ==, asInstanceOf, isInstanceOf, match |
Methods inherited from scala/Iterable-class |
/:, :\, exists, find, foldLeft, foldRight, forall, foreach, sameElements |
Methods inherited from scala/Seq-class |
copyToArray, drop, indexOf, isDefinedAt, lastIndexOf, stringPrefix, subseq, take, toString |
Methods inherited from scala/collection/immutable/Stack-class |
Node, elements, equals, push |
Method Detail |
override def isEmpty: Boolean
override def length: Int
override def +[C >: B](elem: C): Stack[C]
elem
-
the element to push on the stack.
override def +[C >: B](elems: Iterable[C]): Stack[C]
elems
-
the iterable object.
override def top: B
override def pop: Stack[B]
override def apply(n: Int): B
n
-
the index number.
override def toList: List[B]
override def hashCode(): Int
|
Scala
1.2.0.1 |
|||