Documentation ¶
Index ¶
- type Iterator
- type Stack
- func (stack *Stack) Clear()
- func (stack *Stack) Empty() bool
- func (stack *Stack) Iterator() Iterator
- func (stack *Stack) Peek() (value interface{}, ok bool)
- func (stack *Stack) Pop() (value interface{}, ok bool)
- func (stack *Stack) Push(value interface{})
- func (stack *Stack) Size() int
- func (stack *Stack) String() string
- func (stack *Stack) Values() []interface{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Iterator ¶
type Iterator struct {
// contains filtered or unexported fields
}
func (*Iterator) Index ¶
Returns the current element's index. Does not modify the state of the iterator.
type Stack ¶
type Stack struct {
// contains filtered or unexported fields
}
func (*Stack) Peek ¶
Returns top element on the stack without removing it, or nil if stack is empty. Second return parameter is true, unless the stack was empty and there was nothing to peek.
func (*Stack) Pop ¶
Pops (removes) top element on stack and returns it, or nil if stack is empty. Second return parameter is true, unless the stack was empty and there was nothing to pop.
Click to show internal directories.
Click to hide internal directories.