queue

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArrayQueue

type ArrayQueue struct {
	// contains filtered or unexported fields
}

func NewArrayQueue

func NewArrayQueue(size ...int) *ArrayQueue

func (*ArrayQueue) Add

func (aq *ArrayQueue) Add(d interface{}) error

func (*ArrayQueue) Get

func (aq *ArrayQueue) Get() interface{}

func (*ArrayQueue) IsEmpty

func (aq *ArrayQueue) IsEmpty() bool

func (*ArrayQueue) IsFull

func (aq *ArrayQueue) IsFull() bool

func (*ArrayQueue) Size

func (aq *ArrayQueue) Size() int

type Queue

type Queue interface {
	Add(d interface{}) bool
	Offer(d interface{}) bool
	Remove() interface{}
	Poll() interface{}
	Element() interface{}
	Peek() interface{}
}

Jump to

Keyboard shortcuts

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