collections_value

package
v0.0.0-...-791c77c Latest Latest
Warning

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

Go to latest
Published: May 11, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterGob

func RegisterGob[T interfaces.ValueLike]()

func RegisterGobValue

func RegisterGobValue[T interfaces.ValueLike](
	keyer interfaces.StringKeyer[T],
)

Types

type MutableSet

type MutableSet[
	T any,
] struct {
	K interfaces.StringKeyer[T]
	E map[string]T
}

func MakeMutableSet

func MakeMutableSet[T any](
	keyer interfaces.StringKeyer[T],
	es ...T,
) (s MutableSet[T])

func MakeMutableSetValue

func MakeMutableSetValue[T any](
	keyer interfaces.StringKeyer[T],
	es ...T,
) (s MutableSet[T])

func MakeMutableValueSet

func MakeMutableValueSet[T interfaces.Stringer](
	keyer interfaces.StringKeyer[T],
	es ...T,
) (s MutableSet[T])

func MakeMutableValueSetValue

func MakeMutableValueSetValue[T interfaces.Stringer](
	keyer interfaces.StringKeyer[T],
	es ...T,
) (s MutableSet[T])

func (MutableSet[T]) Add

func (s MutableSet[T]) Add(v T) (err error)

func (MutableSet[T]) All

func (s MutableSet[T]) All() iter.Seq[T]

func (MutableSet[T]) AllKeys

func (s MutableSet[T]) AllKeys() iter.Seq[string]

func (MutableSet[T]) Any

func (s MutableSet[T]) Any() (v T)

func (MutableSet[T]) CloneMutableSetLike

func (a MutableSet[T]) CloneMutableSetLike() interfaces.MutableSetLike[T]

func (MutableSet[T]) CloneSetLike

func (a MutableSet[T]) CloneSetLike() interfaces.SetLike[T]

func (MutableSet[T]) Contains

func (s MutableSet[T]) Contains(e T) (ok bool)

func (MutableSet[T]) ContainsKey

func (s MutableSet[T]) ContainsKey(k string) (ok bool)

func (MutableSet[T]) Del

func (s MutableSet[T]) Del(v T) (err error)

func (MutableSet[T]) DelKey

func (s MutableSet[T]) DelKey(k string) (err error)

func (MutableSet[T]) Each

func (s MutableSet[T]) Each(
	wf interfaces.FuncIter[T],
) (err error)

func (MutableSet[T]) EachKey

func (s MutableSet[T]) EachKey(
	wf interfaces.FuncIterKey,
) (err error)

func (MutableSet[T]) Get

func (s MutableSet[T]) Get(k string) (e T, ok bool)

func (MutableSet[T]) Key

func (s MutableSet[T]) Key(e T) string

func (MutableSet[T]) Len

func (s MutableSet[T]) Len() int

func (MutableSet[T]) Reset

func (a MutableSet[T]) Reset()

type Set

type Set[
	T any,
] struct {
	K interfaces.StringKeyer[T]
	E map[string]T
}

func MakeSet

func MakeSet[T any](
	keyer interfaces.StringKeyer[T],
	es ...T,
) (s Set[T])

func MakeSetValue

func MakeSetValue[T interfaces.Stringer](
	keyer interfaces.StringKeyer[T],
	es ...T,
) (s Set[T])

func MakeValueSet

func MakeValueSet[T interfaces.Stringer](
	keyer interfaces.StringKeyer[T],
	es ...T,
) (s Set[T])

func MakeValueSetString

func MakeValueSetString[
	T interfaces.Stringer,
	TPtr interfaces.StringSetterPtr[T],
](
	keyer interfaces.StringKeyer[T],
	es ...string,
) (s Set[T], err error)

func MakeValueSetValue

func MakeValueSetValue[T interfaces.Stringer](
	keyer interfaces.StringKeyer[T],
	es ...T,
) (s Set[T])

func (Set[T]) Add

func (s Set[T]) Add(v T) (err error)

func (Set[T]) All

func (s Set[T]) All() iter.Seq[T]

func (Set[T]) AllKeys

func (s Set[T]) AllKeys() iter.Seq[string]

func (Set[T]) Any

func (s Set[T]) Any() (e T)

func (Set[T]) CloneMutableSetLike

func (a Set[T]) CloneMutableSetLike() interfaces.MutableSetLike[T]

func (Set[T]) CloneSetLike

func (a Set[T]) CloneSetLike() interfaces.SetLike[T]

func (Set[T]) Contains

func (s Set[T]) Contains(e T) (ok bool)

func (Set[T]) ContainsKey

func (s Set[T]) ContainsKey(k string) (ok bool)

func (Set[T]) Each

func (s Set[T]) Each(wf interfaces.FuncIter[T]) (err error)

func (Set[T]) EachKey

func (s Set[T]) EachKey(wf interfaces.FuncIterKey) (err error)

func (Set[T]) Get

func (s Set[T]) Get(k string) (e T, ok bool)

func (Set[T]) Key

func (s Set[T]) Key(e T) string

func (Set[T]) Len

func (s Set[T]) Len() int

Jump to

Keyboard shortcuts

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