|
Scala 2.3.3
|
class
Stack
[A]
extends
java.lang.Object
with
scala.collection.mutable.MutableList[A]
with
scala.ScalaObject
Constructor Summary | |
def
this
|
Var inherited from scala.collection.mutable.MutableList[A] | |
first , last, len |
Def Summary | |
def
++=
(it: scala.Iterator[A])
: scala.Unit
Pushes all elements provided by an iterator on top of the stack. The elements are pushed in the order they are given out by the iterator. |
|
def
++=
(iter: scala.Iterable[A])
: scala.Unit
Pushes all elements provided by an Iterable object
on top of the stack. The elements are pushed in the order they
are given out by the iterator.
|
|
def
+=
(elem: A)
: scala.Unit
Pushes a single element on top of the stack. |
|
def
clear
: scala.Unit
Removes all elements from the stack. After this operation completed, the stack will be empty. |
|
override
|
def
clone
: scala.collection.mutable.Stack[A]
This method clones the stack. |
override
|
def
elements
: scala.Iterator[A]
Returns an iterator over all elements on the stack. This iterator is stable with respect to state changes in the stack object; i.e. such changes will not be reflected in the iterator. The iterator issues elements in the order they were inserted into the stack (FIFO order). |
override
|
def
equals
(that: scala.Any)
: scala.Boolean
Checks if two stacks are structurally identical. |
override
|
def
hashCode
: scala.Int
The hashCode method always yields an error, since it is not safe to use mutable stacks as keys in hash tables. |
override
|
def
isEmpty
: scala.Boolean
Checks if the stack is empty. |
def
pop
: A
Removes the top element from the stack. |
|
def
push
(elems: A*)
: scala.Unit
Pushes a sequence of elements on top of the stack. The first element is pushed first, etc. |
|
override protected
|
def
stringPrefix
: java.lang.String
|
override
|
def
toList
: scala.List[A]
Creates a list of all stack elements in FIFO order. |
def
top
: A
Returns the top element of the stack. This method will not remove the element from the stack. An error is signaled if there is no element on the stack. |
Def inherited from scala.collection.mutable.MutableList[A] | |
appendElem , apply, elements, get, length, prependElem, reset, stringPrefix, toList |
Constructor Detail |
Def Detail |
def
++=
(it: scala.Iterator[A]): scala.Unit
iter -
an iterator
def
++=
(iter: scala.Iterable[A]): scala.Unit
Iterable
object
on top of the stack. The elements are pushed in the order they
are given out by the iterator.iter -
an iterable object
def
+=
(elem: A): scala.Unit
elem -
the element to push onto the stack
def
clear
: scala.Unit
override
def
clone
: scala.collection.mutable.Stack[A]
override
def
elements
: scala.Iterator[A]
override
def
equals
(that: scala.Any): scala.Boolean
override
def
hashCode
: scala.Int
override
def
isEmpty
: scala.Boolean
def
pop
: A
Predef.NoSuchElementException -
def
push
(elems: A*): scala.Unit
elems -
a sequence of elements
override protected
def
stringPrefix
: java.lang.String
override
def
toList
: scala.List[A]
def
top
: A
Predef.NoSuchElementException -