Stack<T > class
Constructors
Stack ()
Default constructor sets the maximum stack size to 'no limit.'
Stack.sized (int sizeMax )
Constructor in which you can specify maximum number of entries.
This maximum is a limit that is enforced as entries are pushed on to the stack
to prevent stack growth beyond a maximum size. There is no pre-allocation of
slots for entries at any time in this library.
Properties
hashCode
→ int
The hash code for this object.
no setter inherited
isEmpty
→ bool
check if the stack is empty.
no setter
isNotEmpty
→ bool
check if the stack is not empty.
no setter
length
→ int
get the length of the stack.
no setter
noLimit
→ int
final
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
Methods
clear ()
→ void
removes all elements from the stack
contains (T x )
→ bool
returns true if element is found in the stack
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pop ()
→ T
get the top of the stack and delete it.
print ()
→ void
print stack
push (T e )
→ void
push element in top of the stack.
size ()
→ int
get the size of the stack.
toList ()
→ List <T >
Returns a list of T elements contained in the Stack
top ()
→ T
get the top of the stack without deleting it.
toString ()
→ String
A string representation of this object.
inherited