collections

package
v0.1.17 Latest Latest
Warning

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

Go to latest
Published: May 2, 2023 License: MIT Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStackIsEmptyNativeError

func NewStackIsEmptyNativeError() error

NewStackIsEmptyNativeError creates an untranslated error to indicate stack is empty (internal error)

Types

type Stack

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

Stack

func NewStack

func NewStack[T any]() *Stack[T]

NewStack

func NewStackWith

func NewStackWith[T any](with []T) *Stack[T]

func (*Stack[T]) Content added in v0.1.7

func (s *Stack[T]) Content() []T

Content

func (*Stack[T]) Current

func (s *Stack[T]) Current() (T, error)

Current

func (*Stack[T]) IsEmpty

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

IsEmpty

func (*Stack[T]) MustPop

func (s *Stack[T]) MustPop() T

MustPop

func (*Stack[T]) Pop

func (s *Stack[T]) Pop() (T, error)

Pop

func (*Stack[T]) Push

func (s *Stack[T]) Push(item T)

Push

func (*Stack[T]) Size

func (s *Stack[T]) Size() uint

Size

Jump to

Keyboard shortcuts

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