stack

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Iterator

type Iterator[V any] struct {
	// contains filtered or unexported fields
}

func (*Iterator[V]) HasNext

func (i *Iterator[V]) HasNext() bool

func (*Iterator[V]) Next

func (i *Iterator[V]) Next() V

func (*Iterator[V]) Remove

func (i *Iterator[V]) Remove()

type Stack

type Stack[V any] struct {
	// contains filtered or unexported fields
}

func From

func From[V any](eq structs.EqualFunc[V], values ...V) *Stack[V]

func FromOrdered

func FromOrdered[V constraints.Ordered](values ...V) *Stack[V]

func New

func New[V any](eq structs.EqualFunc[V]) *Stack[V]

func NewOrdered

func NewOrdered[V constraints.Ordered]() *Stack[V]

func (*Stack[V]) Add

func (s *Stack[V]) Add(value V) bool

func (*Stack[V]) AddAll

func (s *Stack[V]) AddAll(other structs.Collection[V]) bool

func (*Stack[V]) AddIterator

func (s *Stack[V]) AddIterator(iterator structs.Iterator[V]) bool

func (*Stack[V]) Clear

func (s *Stack[V]) Clear()

func (*Stack[V]) Contains

func (s *Stack[V]) Contains(value V) bool

func (*Stack[V]) ContainsAll

func (s *Stack[V]) ContainsAll(other structs.Collection[V]) bool

func (*Stack[V]) Element

func (s *Stack[V]) Element() V

func (*Stack[V]) IsEmpty

func (s *Stack[V]) IsEmpty() bool

func (*Stack[V]) Iterator

func (s *Stack[V]) Iterator() structs.Iterator[V]

func (*Stack[V]) Peek

func (s *Stack[V]) Peek() V

func (*Stack[V]) Poll

func (s *Stack[V]) Poll() V

func (*Stack[V]) Remove

func (s *Stack[V]) Remove(value V) bool

func (*Stack[V]) RemoveAll

func (s *Stack[V]) RemoveAll(other structs.Collection[V]) bool

func (*Stack[V]) RemoveHead

func (s *Stack[V]) RemoveHead() V

func (*Stack[V]) RemoveIterator

func (s *Stack[V]) RemoveIterator(iter structs.Iterator[V]) bool

func (*Stack[V]) RetainAll

func (s *Stack[V]) RetainAll(other structs.Collection[V]) bool

func (*Stack[V]) Size

func (s *Stack[V]) Size() int

func (*Stack[V]) Values

func (s *Stack[V]) Values() []V

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL