queue

package
v0.1.41 Latest Latest
Warning

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

Go to latest
Published: May 12, 2022 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Queue

type Queue struct {
	Uniq bool
	// contains filtered or unexported fields
}

Queue 队列

func New

func New(isUniq bool) *Queue

New Create a new queue

func (*Queue) Any

func (q *Queue) Any() bool

Any 返回true队列不为空

func (*Queue) Len

func (q *Queue) Len() int

Len 获取队列长度

func (*Queue) Peek

func (q *Queue) Peek() string

Peek 返回队列顶端元素

func (*Queue) Pop

func (q *Queue) Pop() string

Pop 出队操作

func (*Queue) Push

func (q *Queue) Push(v string)

Push 入队操作

Jump to

Keyboard shortcuts

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