Scala Library
|
|
trait
StackProxy[A]
extends
Stack[A] with
SeqProxy[A]Method Summary | |
override def
|
++=
(iter : Iterable[A]) : 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. |
override def
|
++=
(it : Iterator[A]) : 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.
|
override def
|
+=
(elem : A) : Unit
Pushes a single element on top of the stack.
|
override def
|
apply
(n : Int) : A
Access element number
n . |
override def
|
clear
: Unit
Removes all elements from the stack. After this operation completed,
the stack will be empty.
|
override def
|
clone
: Stack[A]
This method clones the stack.
|
override def
|
elements
: 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
|
isEmpty
: Boolean
Checks if the stack is empty.
|
override def
|
length
: Int
Returns the length of this stack.
|
override def
|
pop
: A
Removes the top element from the stack.
|
override def
|
push
(elems : A*) : Unit
Pushes a sequence of elements on top of the stack. The first element
is pushed first, etc.
|
abstract def
|
self : Stack[A] |
override def
|
toList
: List[A]
Creates a list of all stack elements in FIFO order.
|
override 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.
|
Methods inherited from SeqProxy | |
lengthCompare, size, concat, last, lastOption, first, firstOption, headOption, ++, isDefinedAt, lastIndexOf, findIndexOf, indexOf, map, flatMap, filter, take, drop, slice, slice, takeWhile, dropWhile, reverse, contains, subseq, toArray, toSeq, projection, equalsWith, startsWith, endsWith, indexOf, containsSlice |
Methods inherited from IterableProxy | |
partition, foreach, forall, exists, find, foldLeft, foldRight, /:, :\, reduceLeft, reduceRight, copyToBuffer, sameElements, toStream, mkString, mkString, mkString, addString, addString, addString, copyToArray, hasDefiniteSize |
Methods inherited from Proxy | |
hashCode, equals, toString |
Methods inherited from Stack | |
stringPrefix |
Methods inherited from Seq | |
startsWith |
Methods inherited from PartialFunction | |
orElse, andThen |
Methods inherited from Function1 | |
compose |
Methods inherited from AnyRef | |
getClass, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
Methods inherited from Any | |
==, !=, isInstanceOf, asInstanceOf |
Method Details |
n
.n
.override
def
length : Int
override
def
isEmpty : Boolean
elem -
the element to push onto the stackIterable
object
on top of the stack. The elements are pushed in the order they
are given out by the iterator.iter -
an iterable objectiter -
an iteratorelems -
a sequence of elementsoverride
def
top : A
override
def
pop : A
override
def
clear : Unit
Scala Library
|
|