Stack<T> class
A simple LIFO stack backed by a ListQueue.
Constructors
- Stack()
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isEmpty → bool
-
Whether the stack is empty.
no setter
- isNotEmpty → bool
-
Whether the stack is not empty.
no setter
- length → int
-
The number of elements in the stack.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
contains(
T x) → bool -
Whether the stack contains
x. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pop(
) → T - Removes and returns the top element.
-
push(
T e) → void -
Pushes
eonto the top of the stack. -
top(
) → T - Returns the top element without removing it.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited