queue

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2023 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 Elem

type Elem[T any] struct {
	// contains filtered or unexported fields
}

func (*Elem[T]) Val

func (e *Elem[T]) Val() T

type Queue

type Queue[T any] struct {
	// contains filtered or unexported fields
}

func NewQueue

func NewQueue[T any]() *Queue[T]

func (*Queue[T]) Init

func (q *Queue[T]) Init()

func (*Queue[T]) IsEmpty

func (q *Queue[T]) IsEmpty() bool

func (*Queue[T]) Next

func (q *Queue[T]) Next(e *Elem[T]) *Elem[T]

func (*Queue[T]) Pop

func (q *Queue[T]) Pop() (val T)

func (*Queue[T]) Pull

func (q *Queue[T]) Pull(val *T) (ok bool)

func (*Queue[T]) PullN

func (q *Queue[T]) PullN(n int, val *T) (ok bool)

func (*Queue[T]) Push

func (q *Queue[T]) Push(val T)

func (*Queue[T]) PushN

func (q *Queue[T]) PushN(n int, val T) (ok bool)

type QueueLim

type QueueLim[T any] struct {
	// contains filtered or unexported fields
}

func NewLim

func NewLim[T any](n int) *QueueLim[T]

func (*QueueLim[T]) Init

func (q *QueueLim[T]) Init(n int)

func (*QueueLim[T]) IsEmpty

func (q *QueueLim[T]) IsEmpty() bool

func (*QueueLim[T]) IsFull

func (q *QueueLim[T]) IsFull() bool

func (*QueueLim[T]) Pull

func (q *QueueLim[T]) Pull(val *T) (ok bool)

func (*QueueLim[T]) Push

func (q *QueueLim[T]) Push(val T) (ok bool)

Jump to

Keyboard shortcuts

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