queue

package
v0.0.0-...-c9ea16c Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item generic.Type

Item the type of the queue

type ItemQueue

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

ItemQueue the queue of Items

func (*ItemQueue) Dequeue

func (q *ItemQueue) Dequeue() *Item

Dequeue remove an Item from the start of the queue

func (*ItemQueue) Enqueue

func (q *ItemQueue) Enqueue(it Item)

Enqueue add an Item to the end of the queue

func (*ItemQueue) IsEmpty

func (q *ItemQueue) IsEmpty() bool

IsEmpty return true if the queue is empty

func (*ItemQueue) Len

func (q *ItemQueue) Len() int

Len return the number of Items in the queue

func (*ItemQueue) New

func (q *ItemQueue) New() *ItemQueue

New create a new ItemQueue

func (*ItemQueue) Peek

func (q *ItemQueue) Peek() *Item

Peek return the item next in the queue, without removing it

Jump to

Keyboard shortcuts

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