hashset

package
v0.1.285 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Float32Set

type Float32Set struct {
	// contains filtered or unexported fields
}

Float32Set holds elements in go's native map

func NewFloat32Set

func NewFloat32Set(values ...float32) *Float32Set

NewFloat32Set instantiates a new empty set and adds the passed values, if any, to the set

func (*Float32Set) Add

func (set *Float32Set) Add(items ...float32)

Add adds the items (one or more) to the set.

func (*Float32Set) Clear

func (set *Float32Set) Clear()

Clear clears all values in the set.

func (*Float32Set) Contains

func (set *Float32Set) Contains(items ...float32) bool

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 (*Float32Set) Empty

func (set *Float32Set) Empty() bool

Empty returns true if set does not contain any elements.

func (*Float32Set) FromJSON

func (set *Float32Set) FromJSON(data []byte) error

FromJSON populates the set from the input JSON representation.

func (*Float32Set) Remove

func (set *Float32Set) Remove(items ...float32)

Remove removes the items (one or more) from the set.

func (*Float32Set) Size

func (set *Float32Set) Size() int

Size returns number of elements within the set.

func (*Float32Set) String

func (set *Float32Set) String() string

String returns a string representation of container

func (*Float32Set) ToJSON

func (set *Float32Set) ToJSON() ([]byte, error)

ToJSON outputs the JSON representation of the set.

func (*Float32Set) Values

func (set *Float32Set) Values() []float32

Values returns all items in the set.

type Float64Set

type Float64Set struct {
	// contains filtered or unexported fields
}

Float64Set holds elements in go's native map

func NewFloat64Set

func NewFloat64Set(values ...float64) *Float64Set

NewFloat64Set instantiates a new empty set and adds the passed values, if any, to the set

func (*Float64Set) Add

func (set *Float64Set) Add(items ...float64)

Add adds the items (one or more) to the set.

func (*Float64Set) Clear

func (set *Float64Set) Clear()

Clear clears all values in the set.

func (*Float64Set) Contains

func (set *Float64Set) Contains(items ...float64) bool

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 (*Float64Set) Empty

func (set *Float64Set) Empty() bool

Empty returns true if set does not contain any elements.

func (*Float64Set) FromJSON

func (set *Float64Set) FromJSON(data []byte) error

FromJSON populates the set from the input JSON representation.

func (*Float64Set) Remove

func (set *Float64Set) Remove(items ...float64)

Remove removes the items (one or more) from the set.

func (*Float64Set) Size

func (set *Float64Set) Size() int

Size returns number of elements within the set.

func (*Float64Set) String

func (set *Float64Set) String() string

String returns a string representation of container

func (*Float64Set) ToJSON

func (set *Float64Set) ToJSON() ([]byte, error)

ToJSON outputs the JSON representation of the set.

func (*Float64Set) Values

func (set *Float64Set) Values() []float64

Values returns all items in the set.

type Int32Set

type Int32Set struct {
	// contains filtered or unexported fields
}

Int32Set holds elements in go's native map

func NewInt32Set

func NewInt32Set(values ...int32) *Int32Set

NewInt32Set instantiates a new empty set and adds the passed values, if any, to the set

func (*Int32Set) Add

func (set *Int32Set) Add(items ...int32)

Add adds the items (one or more) to the set.

func (*Int32Set) Clear

func (set *Int32Set) Clear()

Clear clears all values in the set.

func (*Int32Set) Contains

func (set *Int32Set) Contains(items ...int32) bool

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 (*Int32Set) Empty

func (set *Int32Set) Empty() bool

Empty returns true if set does not contain any elements.

func (*Int32Set) FromJSON

func (set *Int32Set) FromJSON(data []byte) error

FromJSON populates the set from the input JSON representation.

func (*Int32Set) Remove

func (set *Int32Set) Remove(items ...int32)

Remove removes the items (one or more) from the set.

func (*Int32Set) Size

func (set *Int32Set) Size() int

Size returns number of elements within the set.

func (*Int32Set) String

func (set *Int32Set) String() string

String returns a string representation of container

func (*Int32Set) ToJSON

func (set *Int32Set) ToJSON() ([]byte, error)

ToJSON outputs the JSON representation of the set.

func (*Int32Set) Values

func (set *Int32Set) Values() []int32

Values returns all items in the set.

type Int64Set

type Int64Set struct {
	// contains filtered or unexported fields
}

Int64Set holds elements in go's native map

func NewInt64Set

func NewInt64Set(values ...int64) *Int64Set

NewInt64Set instantiates a new empty set and adds the passed values, if any, to the set

func (*Int64Set) Add

func (set *Int64Set) Add(items ...int64)

Add adds the items (one or more) to the set.

func (*Int64Set) Clear

func (set *Int64Set) Clear()

Clear clears all values in the set.

func (*Int64Set) Contains

func (set *Int64Set) Contains(items ...int64) bool

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 (*Int64Set) Empty

func (set *Int64Set) Empty() bool

Empty returns true if set does not contain any elements.

func (*Int64Set) FromJSON

func (set *Int64Set) FromJSON(data []byte) error

FromJSON populates the set from the input JSON representation.

func (*Int64Set) Remove

func (set *Int64Set) Remove(items ...int64)

Remove removes the items (one or more) from the set.

func (*Int64Set) Size

func (set *Int64Set) Size() int

Size returns number of elements within the set.

func (*Int64Set) String

func (set *Int64Set) String() string

String returns a string representation of container

func (*Int64Set) ToJSON

func (set *Int64Set) ToJSON() ([]byte, error)

ToJSON outputs the JSON representation of the set.

func (*Int64Set) Values

func (set *Int64Set) Values() []int64

Values returns all items in the set.

type IntSet

type IntSet struct {
	// contains filtered or unexported fields
}

IntSet holds elements in go's native map

func NewIntSet

func NewIntSet(values ...int) *IntSet

NewIntSet instantiates a new empty set and adds the passed values, if any, to the set

func (*IntSet) Add

func (set *IntSet) Add(items ...int)

Add adds the items (one or more) to the set.

func (*IntSet) Clear

func (set *IntSet) Clear()

Clear clears all values in the set.

func (*IntSet) Contains

func (set *IntSet) Contains(items ...int) bool

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 (*IntSet) Empty

func (set *IntSet) Empty() bool

Empty returns true if set does not contain any elements.

func (*IntSet) FromJSON

func (set *IntSet) FromJSON(data []byte) error

FromJSON populates the set from the input JSON representation.

func (*IntSet) Remove

func (set *IntSet) Remove(items ...int)

Remove removes the items (one or more) from the set.

func (*IntSet) Size

func (set *IntSet) Size() int

Size returns number of elements within the set.

func (*IntSet) String

func (set *IntSet) String() string

String returns a string representation of container

func (*IntSet) ToJSON

func (set *IntSet) ToJSON() ([]byte, error)

ToJSON outputs the JSON representation of the set.

func (*IntSet) Values

func (set *IntSet) Values() []int

Values returns all items in the set.

type StringSet

type StringSet struct {
	// contains filtered or unexported fields
}

StringSet holds elements in go's native map

func NewStringSet

func NewStringSet(values ...string) *StringSet

NewStringSet instantiates a new empty set and adds the passed values, if any, to the set

func (*StringSet) Add

func (set *StringSet) Add(items ...string)

Add adds the items (one or more) to the set.

func (*StringSet) Clear

func (set *StringSet) Clear()

Clear clears all values in the set.

func (*StringSet) Contains

func (set *StringSet) Contains(items ...string) bool

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 (*StringSet) Empty

func (set *StringSet) Empty() bool

Empty returns true if set does not contain any elements.

func (*StringSet) FromJSON

func (set *StringSet) FromJSON(data []byte) error

FromJSON populates the set from the input JSON representation.

func (*StringSet) Remove

func (set *StringSet) Remove(items ...string)

Remove removes the items (one or more) from the set.

func (*StringSet) Size

func (set *StringSet) Size() int

Size returns number of elements within the set.

func (*StringSet) String

func (set *StringSet) String() string

String returns a string representation of container

func (*StringSet) ToJSON

func (set *StringSet) ToJSON() ([]byte, error)

ToJSON outputs the JSON representation of the set.

func (*StringSet) Values

func (set *StringSet) Values() []string

Values returns all items in the set.

type Uint32Set

type Uint32Set struct {
	// contains filtered or unexported fields
}

Uint32Set holds elements in go's native map

func NewUint32Set

func NewUint32Set(values ...uint32) *Uint32Set

NewUint32Set instantiates a new empty set and adds the passed values, if any, to the set

func (*Uint32Set) Add

func (set *Uint32Set) Add(items ...uint32)

Add adds the items (one or more) to the set.

func (*Uint32Set) Clear

func (set *Uint32Set) Clear()

Clear clears all values in the set.

func (*Uint32Set) Contains

func (set *Uint32Set) Contains(items ...uint32) bool

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 (*Uint32Set) Empty

func (set *Uint32Set) Empty() bool

Empty returns true if set does not contain any elements.

func (*Uint32Set) FromJSON

func (set *Uint32Set) FromJSON(data []byte) error

FromJSON populates the set from the input JSON representation.

func (*Uint32Set) Remove

func (set *Uint32Set) Remove(items ...uint32)

Remove removes the items (one or more) from the set.

func (*Uint32Set) Size

func (set *Uint32Set) Size() int

Size returns number of elements within the set.

func (*Uint32Set) String

func (set *Uint32Set) String() string

String returns a string representation of container

func (*Uint32Set) ToJSON

func (set *Uint32Set) ToJSON() ([]byte, error)

ToJSON outputs the JSON representation of the set.

func (*Uint32Set) Values

func (set *Uint32Set) Values() []uint32

Values returns all items in the set.

type Uint64Set

type Uint64Set struct {
	// contains filtered or unexported fields
}

Uint64Set holds elements in go's native map

func NewUint64Set

func NewUint64Set(values ...uint64) *Uint64Set

NewUint64Set instantiates a new empty set and adds the passed values, if any, to the set

func (*Uint64Set) Add

func (set *Uint64Set) Add(items ...uint64)

Add adds the items (one or more) to the set.

func (*Uint64Set) Clear

func (set *Uint64Set) Clear()

Clear clears all values in the set.

func (*Uint64Set) Contains

func (set *Uint64Set) Contains(items ...uint64) bool

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 (*Uint64Set) Empty

func (set *Uint64Set) Empty() bool

Empty returns true if set does not contain any elements.

func (*Uint64Set) FromJSON

func (set *Uint64Set) FromJSON(data []byte) error

FromJSON populates the set from the input JSON representation.

func (*Uint64Set) Remove

func (set *Uint64Set) Remove(items ...uint64)

Remove removes the items (one or more) from the set.

func (*Uint64Set) Size

func (set *Uint64Set) Size() int

Size returns number of elements within the set.

func (*Uint64Set) String

func (set *Uint64Set) String() string

String returns a string representation of container

func (*Uint64Set) ToJSON

func (set *Uint64Set) ToJSON() ([]byte, error)

ToJSON outputs the JSON representation of the set.

func (*Uint64Set) Values

func (set *Uint64Set) Values() []uint64

Values returns all items in the set.

type UintSet

type UintSet struct {
	// contains filtered or unexported fields
}

UintSet holds elements in go's native map

func NewUintSet

func NewUintSet(values ...uint) *UintSet

NewUintSet instantiates a new empty set and adds the passed values, if any, to the set

func (*UintSet) Add

func (set *UintSet) Add(items ...uint)

Add adds the items (one or more) to the set.

func (*UintSet) Clear

func (set *UintSet) Clear()

Clear clears all values in the set.

func (*UintSet) Contains

func (set *UintSet) Contains(items ...uint) bool

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 (*UintSet) Empty

func (set *UintSet) Empty() bool

Empty returns true if set does not contain any elements.

func (*UintSet) FromJSON

func (set *UintSet) FromJSON(data []byte) error

FromJSON populates the set from the input JSON representation.

func (*UintSet) Remove

func (set *UintSet) Remove(items ...uint)

Remove removes the items (one or more) from the set.

func (*UintSet) Size

func (set *UintSet) Size() int

Size returns number of elements within the set.

func (*UintSet) String

func (set *UintSet) String() string

String returns a string representation of container

func (*UintSet) ToJSON

func (set *UintSet) ToJSON() ([]byte, error)

ToJSON outputs the JSON representation of the set.

func (*UintSet) Values

func (set *UintSet) Values() []uint

Values returns all items in the set.

Jump to

Keyboard shortcuts

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