stack

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OpFunc

type OpFunc[T any] func(q *Stack[T])

func WithRWMutex

func WithRWMutex[T any]() OpFunc[T]

WithRWMutex 赋值函数

type Stack

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

func New

func New[T any](ops ...OpFunc[T]) *Stack[T]

func (*Stack[T]) Clear

func (q *Stack[T]) Clear()

func (*Stack[T]) Empty

func (q *Stack[T]) Empty() bool

func (*Stack[T]) Pop

func (q *Stack[T]) Pop() T

func (*Stack[T]) Push

func (q *Stack[T]) Push(val T)

func (*Stack[T]) Size

func (q *Stack[T]) Size() int

func (*Stack[T]) String

func (q *Stack[T]) String() string

func (*Stack[T]) Top

func (q *Stack[T]) Top() T

Jump to

Keyboard shortcuts

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