Documentation ¶
Index ¶
- type Element
- type FIFOUniqueList
- func (l *FIFOUniqueList[T]) FindAll() []T
- func (l *FIFOUniqueList[T]) FindMany(cb func(prev, curr, next T) bool) []T
- func (l *FIFOUniqueList[T]) FindOne(cb func(prev, curr, next T) bool) (T, bool)
- func (l *FIFOUniqueList[T]) Pop()
- func (l *FIFOUniqueList[T]) Push(in T)
- func (l *FIFOUniqueList[T]) Remove(in T) bool
- func (l *FIFOUniqueList[T]) RemoveMany(cb func(prev, curr, next T) bool) bool
- func (l *FIFOUniqueList[T]) RemoveOne(cb func(prev, curr, next T) bool) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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]) 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]) 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 ...
Click to show internal directories.
Click to hide internal directories.