queue

package
v0.0.0-...-e1f35ab Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2020 License: LGPL-3.0 Imports: 0 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Element

type Element interface{}

type Fifo

type Fifo interface {
	Put(e Element) //向队列中添加元素
	Get() Element  //移除队列中最前面的元素
	Clear() bool   //清空队列
	Size() int     //获取队列的元素个数
	IsEmpty() bool //判断队列是否是空
}

type SliceFifo

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

func NewQueue

func NewQueue() *SliceFifo

func (*SliceFifo) Clear

func (f *SliceFifo) Clear() bool

func (*SliceFifo) Get

func (f *SliceFifo) Get() Element

移除队列中最前面的额元素

func (*SliceFifo) GetData

func (f *SliceFifo) GetData(i uint32) Element

func (*SliceFifo) IsEmpty

func (f *SliceFifo) IsEmpty() bool

func (*SliceFifo) Peek

func (f *SliceFifo) Peek() Element

func (*SliceFifo) Put

func (f *SliceFifo) Put(e Element)

向队列中添加元素

func (*SliceFifo) Size

func (f *SliceFifo) Size() int

Jump to

Keyboard shortcuts

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