sliceset

package
v1.12.19 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SliceSet

type SliceSet[T any] struct {
	Items []*T
}

SliceSet is a set implementation that uses slice internally.

func (*SliceSet[T]) Add

func (l *SliceSet[T]) Add(pe *T) bool

Add the piece to the set.

func (*SliceSet[T]) Has

func (l *SliceSet[T]) Has(pe *T) bool

Has returns true if the set contains the piece.

func (*SliceSet[T]) Len

func (l *SliceSet[T]) Len() int

Len returns the number of pieces in the set.

func (*SliceSet[T]) Remove

func (l *SliceSet[T]) Remove(pe *T) bool

Remove the piece from the set.

Jump to

Keyboard shortcuts

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