queue

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 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 Queue

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

Queue represents a Queue

func New

func New() *Queue

New create a Queue

func Of

func Of(universe *[]*entry.Entry) *Queue

Of creates a Queue from a slice of pointer to Entry

func (*Queue) Add

func (q *Queue) Add(el *entry.Entry)

Add adds an entry at last of the Queue

func (*Queue) Len

func (q *Queue) Len() int

Len returns the length of the Queue

func (*Queue) Peek

func (q *Queue) Peek() *entry.Entry

Peek returns the last entry in Queue

func (*Queue) Poll

func (q *Queue) Poll() *entry.Entry

Poll pops and returns the first entry in the Queue

Jump to

Keyboard shortcuts

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