Documentation ¶
Index ¶
- Variables
- type HashSet
- func (set *HashSet[T]) Add(elements ...T)
- func (set *HashSet[T]) Clear()
- func (set *HashSet[T]) Contains(elements ...T) bool
- func (set *HashSet[T]) FromJSON(data []byte) error
- func (set *HashSet[T]) IsEmpty() bool
- func (set *HashSet[T]) MarshalJSON() ([]byte, error)
- func (set *HashSet[T]) Remove(elements ...T)
- func (set *HashSet[T]) Size() int
- func (set *HashSet[T]) String() string
- func (set *HashSet[T]) ToJSON() ([]byte, error)
- func (set *HashSet[T]) UnmarshalJSON(bytes []byte) error
- func (set *HashSet[T]) Values() []T
- type ISet
Constants ¶
This section is empty.
Variables ¶
View Source
var EmptyStruct = struct{}{}
EmptyStruct zero memory
Functions ¶
This section is empty.
Types ¶
type HashSet ¶
type HashSet[T comparable] struct { // contains filtered or unexported fields }
HashSet holds elements in go's native map
func (*HashSet[T]) Contains ¶
Contains check if items (one or more) are present in the set. All items have to be present in the set for the method to return true. Returns true if no arguments are passed at all, i.e. set is always superset of empty set.
func (*HashSet[T]) MarshalJSON ¶
MarshalJSON @implements json.Marshaler
func (*HashSet[T]) UnmarshalJSON ¶
UnmarshalJSON @implements json.Unmarshaler
Click to show internal directories.
Click to hide internal directories.