hashset

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2022 License: MIT Imports: 1 Imported by: 0

README

hashset

Go Reference

This is a trivial HashSet library written in Go using generics and map.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HashSet

type HashSet[T comparable] struct {
	// contains filtered or unexported fields
}

func New

func New[T comparable](values ...T) HashSet[T]

func (HashSet[T]) Add

func (h HashSet[T]) Add(v T)

func (HashSet[T]) Contains

func (h HashSet[T]) Contains(v T) bool

func (HashSet[T]) ContainsAll

func (h HashSet[T]) ContainsAll(values ...T) bool

func (HashSet[T]) Delete

func (h HashSet[T]) Delete(v T)

func (HashSet[T]) Equal

func (h HashSet[T]) Equal(o HashSet[T]) bool

func (HashSet[T]) ToSlice

func (h HashSet[T]) ToSlice() []T

Jump to

Keyboard shortcuts

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