list

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Element

type Element[T any] struct {
	Prev  *Element[T]
	Value T
	Next  *Element[T]
}

Element ...

type FIFOUniqueList

type FIFOUniqueList[T any] struct {
	FirstElem   *Element[T]
	LastElem    *Element[T]
	Size        int
	MaxSize     int
	CompareFunc func(T, T) bool
}

FIFOUniqueList ...

func NewFIFOUniqueList

func NewFIFOUniqueList[T any](maxSize int, compareFnc func(T, T) bool, elements ...T) *FIFOUniqueList[T]

NewFIFOUniqueList ...

func (*FIFOUniqueList[T]) FindAll

func (l *FIFOUniqueList[T]) FindAll() []T

FindAll ...

func (*FIFOUniqueList[T]) FindMany

func (l *FIFOUniqueList[T]) FindMany(cb func(prev, curr, next T) bool) []T

FindMany ...

func (*FIFOUniqueList[T]) FindOne

func (l *FIFOUniqueList[T]) FindOne(cb func(prev, curr, next T) bool) (T, bool)

FindOne ...

func (*FIFOUniqueList[T]) Pop

func (l *FIFOUniqueList[T]) Pop()

Pop ...

func (*FIFOUniqueList[T]) Push

func (l *FIFOUniqueList[T]) Push(in T)

Push ...

func (*FIFOUniqueList[T]) Remove

func (l *FIFOUniqueList[T]) Remove(in T) bool

Remove ...

func (*FIFOUniqueList[T]) RemoveMany

func (l *FIFOUniqueList[T]) RemoveMany(cb func(prev, curr, next T) bool) bool

RemoveMany ...

func (*FIFOUniqueList[T]) RemoveOne

func (l *FIFOUniqueList[T]) RemoveOne(cb func(prev, curr, next T) bool) bool

RemoveOne ...

Jump to

Keyboard shortcuts

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