queue

package
v0.0.0-...-da378b8 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package queue creates a ItemQueue data structure for the Item type

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 (s *ItemQueue) Dequeue() *Item

Dequeue removes an Item from the start of the queue

func (*ItemQueue) Enqueue

func (s *ItemQueue) Enqueue(t Item)

Enqueue adds an Item to the end of the queue

func (*ItemQueue) Front

func (s *ItemQueue) Front() *Item

Front returns the item next in the queue, without removing it

func (*ItemQueue) IsEmpty

func (s *ItemQueue) IsEmpty() bool

IsEmpty returns true if the queue is empty

func (*ItemQueue) New

func (s *ItemQueue) New() *ItemQueue

New creates a new ItemQueue

func (*ItemQueue) Size

func (s *ItemQueue) Size() int

Size returns the number of Items in the queue

Jump to

Keyboard shortcuts

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