gsets

package
v0.0.0-...-b53f8ce Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2023 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Int64s

type Int64s = Set[int64]

type Ints

type Ints = Set[int]

type SafeInt64s

type SafeInt64s = SafeSet[int64]

type SafeInts

type SafeInts = SafeSet[int]

type SafeSet

type SafeSet[T internal.Ordered] struct {
	// contains filtered or unexported fields
}

func SafeOf

func SafeOf[T internal.Ordered](keys ...T) *SafeSet[T]

func (*SafeSet[T]) Add

func (ss *SafeSet[T]) Add(keys ...T) *SafeSet[T]

func (*SafeSet[T]) AddIfNotExists

func (ss *SafeSet[T]) AddIfNotExists(key T) bool

func (*SafeSet[T]) Clone

func (ss *SafeSet[T]) Clone() *SafeSet[T]

func (*SafeSet[T]) Delete

func (ss *SafeSet[T]) Delete(keys ...T) *SafeSet[T]

func (*SafeSet[T]) Has

func (ss *SafeSet[T]) Has(key T) bool

func (*SafeSet[T]) Keys

func (ss *SafeSet[T]) Keys() []T

func (*SafeSet[T]) Len

func (ss *SafeSet[T]) Len() int

func (*SafeSet[T]) MarshalBinary

func (ss *SafeSet[T]) MarshalBinary() ([]byte, error)

func (*SafeSet[T]) MarshalJSON

func (ss *SafeSet[T]) MarshalJSON() ([]byte, error)

func (*SafeSet[T]) Merge

func (ss *SafeSet[T]) Merge(o Set[T]) *SafeSet[T]

func (*SafeSet[T]) MergeSafe

func (ss *SafeSet[T]) MergeSafe(o *SafeSet[T]) *SafeSet[T]

func (*SafeSet[T]) Set

func (ss *SafeSet[T]) Set(keys ...T) *SafeSet[T]

func (*SafeSet[T]) SortedKeys

func (ss *SafeSet[T]) SortedKeys() []T

func (*SafeSet[T]) UnmarshalBinary

func (ss *SafeSet[T]) UnmarshalBinary(data []byte) error

func (*SafeSet[T]) UnmarshalJSON

func (ss *SafeSet[T]) UnmarshalJSON(data []byte) error

type SafeStrings

type SafeStrings = SafeSet[string]

type Set

type Set[T internal.Ordered] map[T]struct{}

Set[T] is a simple set.

func Of

func Of[T internal.Ordered](keys ...T) Set[T]

func (Set[T]) Add

func (s Set[T]) Add(keys ...T) Set[T]

func (*Set[T]) AddIfNotExists

func (s *Set[T]) AddIfNotExists(key T) bool

AddIfNotExists returns true if the key was added, false if it already existed

func (Set[T]) Clone

func (s Set[T]) Clone() Set[T]

func (Set[T]) Delete

func (s Set[T]) Delete(keys ...T) Set[T]

func (Set[T]) Equal

func (s Set[T]) Equal(os Set[T]) bool

func (Set[T]) Has

func (s Set[T]) Has(key T) bool

func (Set[T]) Keys

func (s Set[T]) Keys() []T

func (Set[T]) Len

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

func (Set[T]) MarshalBinary

func (s Set[T]) MarshalBinary() ([]byte, error)

func (Set[T]) MarshalJSON

func (s Set[T]) MarshalJSON() ([]byte, error)

func (Set[T]) Merge

func (s Set[T]) Merge(os ...Set[T]) Set[T]

func (*Set[T]) Set

func (s *Set[T]) Set(keys ...T) Set[T]

func (Set[T]) SortedKeys

func (s Set[T]) SortedKeys() []T

func (Set[T]) String

func (s Set[T]) String() string

func (*Set[T]) UnmarshalBinary

func (s *Set[T]) UnmarshalBinary(data []byte) (err error)

func (*Set[T]) UnmarshalJSON

func (s *Set[T]) UnmarshalJSON(data []byte) (err error)

type Strings

type Strings = Set[string]

Jump to

Keyboard shortcuts

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