Documentation
¶
Index ¶
- type Builder
- type HashMapSet
- func (s HashMapSet[_, _]) Cardinality() (core.Cardinal, bool)
- func (s HashMapSet[Obj, Key]) Clone() HashMapSet[Obj, Key]
- func (s HashMapSet[Obj, _]) Contains(obj Obj) bool
- func (s *HashMapSet[Obj, _]) Exclude(objs ...Obj)
- func (s *HashMapSet[Obj, _]) ExcludeAll(seq iter.Seq[Obj])
- func (s *HashMapSet[Obj, _]) ExcludeSeq(seq seqs.Seq[Obj])
- func (s HashMapSet[Obj, _]) ForEachWhile(yield func(Obj) bool)
- func (s HashMapSet[Obj, Key]) GetByKey(key Key) (Obj, bool)
- func (s *HashMapSet[Obj, _]) Include(objs ...Obj)
- func (s *HashMapSet[Obj, _]) IncludeAll(seq iter.Seq[Obj])
- func (s *HashMapSet[Obj, _]) IncludeSeq(seq seqs.Seq[Obj])
- func (s HashMapSet[Obj, Key]) Len() int
- func (s HashMapSet[Obj, _]) Values(yield func(Obj) bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder[Obj any, Key comparable] struct { // contains filtered or unexported fields }
func WithGetKey ¶
func WithGetKey[Obj any, Key comparable](getKey func(Obj) Key) Builder[Obj, Key]
func (Builder[Obj, Key]) FromIter ¶
func (b Builder[Obj, Key]) FromIter(seq iter.Seq[Obj]) HashMapSet[Obj, Key]
func (Builder[Obj, Key]) FromSeq ¶
func (b Builder[Obj, Key]) FromSeq(seq seqs.Seq[Obj]) HashMapSet[Obj, Key]
func (Builder[Obj, Key]) FromSlice ¶
func (b Builder[Obj, Key]) FromSlice(objs []Obj) HashMapSet[Obj, Key]
func (Builder[Obj, Key]) FromValues ¶
func (b Builder[Obj, Key]) FromValues(objs ...Obj) HashMapSet[Obj, Key]
type HashMapSet ¶
type HashMapSet[Obj any, Key comparable] struct { // contains filtered or unexported fields }
HashMapSet is a set of objects which are compared using a key derived from them.
func New ¶
func New[Obj any, Key comparable](getKey func(Obj) Key) HashMapSet[Obj, Key]
New returns an empty HashMapSet with the specified key extraction function.
func (HashMapSet[_, _]) Cardinality ¶
func (s HashMapSet[_, _]) Cardinality() (core.Cardinal, bool)
func (HashMapSet[Obj, Key]) Clone ¶
func (s HashMapSet[Obj, Key]) Clone() HashMapSet[Obj, Key]
func (HashMapSet[Obj, _]) Contains ¶
func (s HashMapSet[Obj, _]) Contains(obj Obj) bool
func (*HashMapSet[Obj, _]) Exclude ¶
func (s *HashMapSet[Obj, _]) Exclude(objs ...Obj)
func (*HashMapSet[Obj, _]) ExcludeAll ¶
func (s *HashMapSet[Obj, _]) ExcludeAll(seq iter.Seq[Obj])
func (*HashMapSet[Obj, _]) ExcludeSeq ¶
func (s *HashMapSet[Obj, _]) ExcludeSeq(seq seqs.Seq[Obj])
func (HashMapSet[Obj, _]) ForEachWhile ¶ added in v0.8.0
func (s HashMapSet[Obj, _]) ForEachWhile(yield func(Obj) bool)
func (HashMapSet[Obj, Key]) GetByKey ¶
func (s HashMapSet[Obj, Key]) GetByKey(key Key) (Obj, bool)
func (*HashMapSet[Obj, _]) Include ¶
func (s *HashMapSet[Obj, _]) Include(objs ...Obj)
func (*HashMapSet[Obj, _]) IncludeAll ¶
func (s *HashMapSet[Obj, _]) IncludeAll(seq iter.Seq[Obj])
func (*HashMapSet[Obj, _]) IncludeSeq ¶
func (s *HashMapSet[Obj, _]) IncludeSeq(seq seqs.Seq[Obj])
func (HashMapSet[Obj, Key]) Len ¶
func (s HashMapSet[Obj, Key]) Len() int
func (HashMapSet[Obj, _]) Values ¶
func (s HashMapSet[Obj, _]) Values(yield func(Obj) bool)
Click to show internal directories.
Click to hide internal directories.