set

package
v0.0.0-...-2eb6bad Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2022 License: MIT Imports: 1 Imported by: 0

README

Set

We use the go generator to generate the type set structure, all types were generated by go generator.

Quickstarts

ThreadSafe Set
myset := set.NewThreadSafeInt8Set(1,2,3,4),
myset.Add(5)
myset.Remove(1)
myset.Contains(1)
myset.ContainsAny(1, 2, 3)

myset.In(targetSet)
myset.Equal(targetSet)
myset.ToList()
Non-ThreadSafe Set
myset := set.NewInt8Set(1,2,3,4),
myset.Add(5)
myset.Remove(1)
myset.Contains(1)
myset.ContainsAny(1, 2, 3)

myset.In(targetSet)
myset.Equal(targetSet)
myset.ToList()

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ByteSet

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

ByteSet was the set structure for byte type

func NewByteSet

func NewByteSet(members ...byte) *ByteSet

NewByteSet would create a new byte set with members

func NewThreadSafeByteSet

func NewThreadSafeByteSet(members ...byte) *ByteSet

NewThreadSafeByteSet was thread safe set that allows concurrent access between the goroutines

func (*ByteSet) Add

func (s *ByteSet) Add(member byte) bool

Add would add the member into the set return true is the member was not exists

func (*ByteSet) Card

func (s *ByteSet) Card() int

Card returns the set cardinality (number of elements) of the set

func (*ByteSet) Contains

func (s *ByteSet) Contains(member byte) bool

Contains was used to check whether the member was existed in set or not

func (*ByteSet) ContainsAny

func (s *ByteSet) ContainsAny(members ...byte) bool

ContainsAny was used to check any members were existed in set

func (*ByteSet) Diff

func (s *ByteSet) Diff(sets ...*ByteSet) *ByteSet

Diff returns the members of the set resulting from the difference between the first set and all the successive sets

func (*ByteSet) Equal

func (s *ByteSet) Equal(targetSet *ByteSet) bool

Equal was used to check whether the members are the same

func (*ByteSet) In

func (s *ByteSet) In(targetSet *ByteSet) bool

In was used to check if all the set members was contains by targetSet, empty set would be always in other set.

func (*ByteSet) Inter

func (s *ByteSet) Inter(sets ...*ByteSet) *ByteSet

Inter returns the members of the set resulting from the intersection of all the given sets

func (*ByteSet) Remove

func (s *ByteSet) Remove(member byte) bool

Remove would delete the member for the set if exists return true when the member was existed

func (*ByteSet) ToList

func (s *ByteSet) ToList() []byte

ToList would return the list of set members the undetermined order, since we use the map iterator that would random iter members. Please sort the list yourself if the fixed order was expected.

func (*ByteSet) Union

func (s *ByteSet) Union(sets ...*ByteSet) *ByteSet

Union returns the members of the set resulting from the union of all the given sets

type Float32Set

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

Float32Set was the set structure for float32 type

func NewFloat32Set

func NewFloat32Set(members ...float32) *Float32Set

NewFloat32Set would create a new float32 set with members

func NewThreadSafeFloat32Set

func NewThreadSafeFloat32Set(members ...float32) *Float32Set

NewThreadSafeFloat32Set was thread safe set that allows concurrent access between the goroutines

func (*Float32Set) Add

func (s *Float32Set) Add(member float32) bool

Add would add the member into the set return true is the member was not exists

func (*Float32Set) Card

func (s *Float32Set) Card() int

Card returns the set cardinality (number of elements) of the set

func (*Float32Set) Contains

func (s *Float32Set) Contains(member float32) bool

Contains was used to check whether the member was existed in set or not

func (*Float32Set) ContainsAny

func (s *Float32Set) ContainsAny(members ...float32) bool

ContainsAny was used to check any members were existed in set

func (*Float32Set) Diff

func (s *Float32Set) Diff(sets ...*Float32Set) *Float32Set

Diff returns the members of the set resulting from the difference between the first set and all the successive sets

func (*Float32Set) Equal

func (s *Float32Set) Equal(targetSet *Float32Set) bool

Equal was used to check whether the members are the same

func (*Float32Set) In

func (s *Float32Set) In(targetSet *Float32Set) bool

In was used to check if all the set members was contains by targetSet, empty set would be always in other set.

func (*Float32Set) Inter

func (s *Float32Set) Inter(sets ...*Float32Set) *Float32Set

Inter returns the members of the set resulting from the intersection of all the given sets

func (*Float32Set) Remove

func (s *Float32Set) Remove(member float32) bool

Remove would delete the member for the set if exists return true when the member was existed

func (*Float32Set) ToList

func (s *Float32Set) ToList() []float32

ToList would return the list of set members the undetermined order, since we use the map iterator that would random iter members. Please sort the list yourself if the fixed order was expected.

func (*Float32Set) Union

func (s *Float32Set) Union(sets ...*Float32Set) *Float32Set

Union returns the members of the set resulting from the union of all the given sets

type Float64Set

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

Float64Set was the set structure for float64 type

func NewFloat64Set

func NewFloat64Set(members ...float64) *Float64Set

NewFloat64Set would create a new float64 set with members

func NewThreadSafeFloat64Set

func NewThreadSafeFloat64Set(members ...float64) *Float64Set

NewThreadSafeFloat64Set was thread safe set that allows concurrent access between the goroutines

func (*Float64Set) Add

func (s *Float64Set) Add(member float64) bool

Add would add the member into the set return true is the member was not exists

func (*Float64Set) Card

func (s *Float64Set) Card() int

Card returns the set cardinality (number of elements) of the set

func (*Float64Set) Contains

func (s *Float64Set) Contains(member float64) bool

Contains was used to check whether the member was existed in set or not

func (*Float64Set) ContainsAny

func (s *Float64Set) ContainsAny(members ...float64) bool

ContainsAny was used to check any members were existed in set

func (*Float64Set) Diff

func (s *Float64Set) Diff(sets ...*Float64Set) *Float64Set

Diff returns the members of the set resulting from the difference between the first set and all the successive sets

func (*Float64Set) Equal

func (s *Float64Set) Equal(targetSet *Float64Set) bool

Equal was used to check whether the members are the same

func (*Float64Set) In

func (s *Float64Set) In(targetSet *Float64Set) bool

In was used to check if all the set members was contains by targetSet, empty set would be always in other set.

func (*Float64Set) Inter

func (s *Float64Set) Inter(sets ...*Float64Set) *Float64Set

Inter returns the members of the set resulting from the intersection of all the given sets

func (*Float64Set) Remove

func (s *Float64Set) Remove(member float64) bool

Remove would delete the member for the set if exists return true when the member was existed

func (*Float64Set) ToList

func (s *Float64Set) ToList() []float64

ToList would return the list of set members the undetermined order, since we use the map iterator that would random iter members. Please sort the list yourself if the fixed order was expected.

func (*Float64Set) Union

func (s *Float64Set) Union(sets ...*Float64Set) *Float64Set

Union returns the members of the set resulting from the union of all the given sets

type Int16Set

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

Int16Set was the set structure for int16 type

func NewInt16Set

func NewInt16Set(members ...int16) *Int16Set

NewInt16Set would create a new int16 set with members

func NewThreadSafeInt16Set

func NewThreadSafeInt16Set(members ...int16) *Int16Set

NewThreadSafeInt16Set was thread safe set that allows concurrent access between the goroutines

func (*Int16Set) Add

func (s *Int16Set) Add(member int16) bool

Add would add the member into the set return true is the member was not exists

func (*Int16Set) Card

func (s *Int16Set) Card() int

Card returns the set cardinality (number of elements) of the set

func (*Int16Set) Contains

func (s *Int16Set) Contains(member int16) bool

Contains was used to check whether the member was existed in set or not

func (*Int16Set) ContainsAny

func (s *Int16Set) ContainsAny(members ...int16) bool

ContainsAny was used to check any members were existed in set

func (*Int16Set) Diff

func (s *Int16Set) Diff(sets ...*Int16Set) *Int16Set

Diff returns the members of the set resulting from the difference between the first set and all the successive sets

func (*Int16Set) Equal

func (s *Int16Set) Equal(targetSet *Int16Set) bool

Equal was used to check whether the members are the same

func (*Int16Set) In

func (s *Int16Set) In(targetSet *Int16Set) bool

In was used to check if all the set members was contains by targetSet, empty set would be always in other set.

func (*Int16Set) Inter

func (s *Int16Set) Inter(sets ...*Int16Set) *Int16Set

Inter returns the members of the set resulting from the intersection of all the given sets

func (*Int16Set) Remove

func (s *Int16Set) Remove(member int16) bool

Remove would delete the member for the set if exists return true when the member was existed

func (*Int16Set) ToList

func (s *Int16Set) ToList() []int16

ToList would return the list of set members the undetermined order, since we use the map iterator that would random iter members. Please sort the list yourself if the fixed order was expected.

func (*Int16Set) Union

func (s *Int16Set) Union(sets ...*Int16Set) *Int16Set

Union returns the members of the set resulting from the union of all the given sets

type Int32Set

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

Int32Set was the set structure for int32 type

func NewInt32Set

func NewInt32Set(members ...int32) *Int32Set

NewInt32Set would create a new int32 set with members

func NewThreadSafeInt32Set

func NewThreadSafeInt32Set(members ...int32) *Int32Set

NewThreadSafeInt32Set was thread safe set that allows concurrent access between the goroutines

func (*Int32Set) Add

func (s *Int32Set) Add(member int32) bool

Add would add the member into the set return true is the member was not exists

func (*Int32Set) Card

func (s *Int32Set) Card() int

Card returns the set cardinality (number of elements) of the set

func (*Int32Set) Contains

func (s *Int32Set) Contains(member int32) bool

Contains was used to check whether the member was existed in set or not

func (*Int32Set) ContainsAny

func (s *Int32Set) ContainsAny(members ...int32) bool

ContainsAny was used to check any members were existed in set

func (*Int32Set) Diff

func (s *Int32Set) Diff(sets ...*Int32Set) *Int32Set

Diff returns the members of the set resulting from the difference between the first set and all the successive sets

func (*Int32Set) Equal

func (s *Int32Set) Equal(targetSet *Int32Set) bool

Equal was used to check whether the members are the same

func (*Int32Set) In

func (s *Int32Set) In(targetSet *Int32Set) bool

In was used to check if all the set members was contains by targetSet, empty set would be always in other set.

func (*Int32Set) Inter

func (s *Int32Set) Inter(sets ...*Int32Set) *Int32Set

Inter returns the members of the set resulting from the intersection of all the given sets

func (*Int32Set) Remove

func (s *Int32Set) Remove(member int32) bool

Remove would delete the member for the set if exists return true when the member was existed

func (*Int32Set) ToList

func (s *Int32Set) ToList() []int32

ToList would return the list of set members the undetermined order, since we use the map iterator that would random iter members. Please sort the list yourself if the fixed order was expected.

func (*Int32Set) Union

func (s *Int32Set) Union(sets ...*Int32Set) *Int32Set

Union returns the members of the set resulting from the union of all the given sets

type Int64Set

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

Int64Set was the set structure for int64 type

func NewInt64Set

func NewInt64Set(members ...int64) *Int64Set

NewInt64Set would create a new int64 set with members

func NewThreadSafeInt64Set

func NewThreadSafeInt64Set(members ...int64) *Int64Set

NewThreadSafeInt64Set was thread safe set that allows concurrent access between the goroutines

func (*Int64Set) Add

func (s *Int64Set) Add(member int64) bool

Add would add the member into the set return true is the member was not exists

func (*Int64Set) Card

func (s *Int64Set) Card() int

Card returns the set cardinality (number of elements) of the set

func (*Int64Set) Contains

func (s *Int64Set) Contains(member int64) bool

Contains was used to check whether the member was existed in set or not

func (*Int64Set) ContainsAny

func (s *Int64Set) ContainsAny(members ...int64) bool

ContainsAny was used to check any members were existed in set

func (*Int64Set) Diff

func (s *Int64Set) Diff(sets ...*Int64Set) *Int64Set

Diff returns the members of the set resulting from the difference between the first set and all the successive sets

func (*Int64Set) Equal

func (s *Int64Set) Equal(targetSet *Int64Set) bool

Equal was used to check whether the members are the same

func (*Int64Set) In

func (s *Int64Set) In(targetSet *Int64Set) bool

In was used to check if all the set members was contains by targetSet, empty set would be always in other set.

func (*Int64Set) Inter

func (s *Int64Set) Inter(sets ...*Int64Set) *Int64Set

Inter returns the members of the set resulting from the intersection of all the given sets

func (*Int64Set) Remove

func (s *Int64Set) Remove(member int64) bool

Remove would delete the member for the set if exists return true when the member was existed

func (*Int64Set) ToList

func (s *Int64Set) ToList() []int64

ToList would return the list of set members the undetermined order, since we use the map iterator that would random iter members. Please sort the list yourself if the fixed order was expected.

func (*Int64Set) Union

func (s *Int64Set) Union(sets ...*Int64Set) *Int64Set

Union returns the members of the set resulting from the union of all the given sets

type Int8Set

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

Int8Set was the set structure for int8 type

func NewInt8Set

func NewInt8Set(members ...int8) *Int8Set

NewInt8Set would create a new int8 set with members

func NewThreadSafeInt8Set

func NewThreadSafeInt8Set(members ...int8) *Int8Set

NewThreadSafeInt8Set was thread safe set that allows concurrent access between the goroutines

func (*Int8Set) Add

func (s *Int8Set) Add(member int8) bool

Add would add the member into the set return true is the member was not exists

func (*Int8Set) Card

func (s *Int8Set) Card() int

Card returns the set cardinality (number of elements) of the set

func (*Int8Set) Contains

func (s *Int8Set) Contains(member int8) bool

Contains was used to check whether the member was existed in set or not

func (*Int8Set) ContainsAny

func (s *Int8Set) ContainsAny(members ...int8) bool

ContainsAny was used to check any members were existed in set

func (*Int8Set) Diff

func (s *Int8Set) Diff(sets ...*Int8Set) *Int8Set

Diff returns the members of the set resulting from the difference between the first set and all the successive sets

func (*Int8Set) Equal

func (s *Int8Set) Equal(targetSet *Int8Set) bool

Equal was used to check whether the members are the same

func (*Int8Set) In

func (s *Int8Set) In(targetSet *Int8Set) bool

In was used to check if all the set members was contains by targetSet, empty set would be always in other set.

func (*Int8Set) Inter

func (s *Int8Set) Inter(sets ...*Int8Set) *Int8Set

Inter returns the members of the set resulting from the intersection of all the given sets

func (*Int8Set) Remove

func (s *Int8Set) Remove(member int8) bool

Remove would delete the member for the set if exists return true when the member was existed

func (*Int8Set) ToList

func (s *Int8Set) ToList() []int8

ToList would return the list of set members the undetermined order, since we use the map iterator that would random iter members. Please sort the list yourself if the fixed order was expected.

func (*Int8Set) Union

func (s *Int8Set) Union(sets ...*Int8Set) *Int8Set

Union returns the members of the set resulting from the union of all the given sets

type IntSet

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

IntSet was the set structure for int type

func NewIntSet

func NewIntSet(members ...int) *IntSet

NewIntSet would create a new int set with members

func NewThreadSafeIntSet

func NewThreadSafeIntSet(members ...int) *IntSet

NewThreadSafeIntSet was thread safe set that allows concurrent access between the goroutines

func (*IntSet) Add

func (s *IntSet) Add(member int) bool

Add would add the member into the set return true is the member was not exists

func (*IntSet) Card

func (s *IntSet) Card() int

Card returns the set cardinality (number of elements) of the set

func (*IntSet) Contains

func (s *IntSet) Contains(member int) bool

Contains was used to check whether the member was existed in set or not

func (*IntSet) ContainsAny

func (s *IntSet) ContainsAny(members ...int) bool

ContainsAny was used to check any members were existed in set

func (*IntSet) Diff

func (s *IntSet) Diff(sets ...*IntSet) *IntSet

Diff returns the members of the set resulting from the difference between the first set and all the successive sets

func (*IntSet) Equal

func (s *IntSet) Equal(targetSet *IntSet) bool

Equal was used to check whether the members are the same

func (*IntSet) In

func (s *IntSet) In(targetSet *IntSet) bool

In was used to check if all the set members was contains by targetSet, empty set would be always in other set.

func (*IntSet) Inter

func (s *IntSet) Inter(sets ...*IntSet) *IntSet

Inter returns the members of the set resulting from the intersection of all the given sets

func (*IntSet) Remove

func (s *IntSet) Remove(member int) bool

Remove would delete the member for the set if exists return true when the member was existed

func (*IntSet) ToList

func (s *IntSet) ToList() []int

ToList would return the list of set members the undetermined order, since we use the map iterator that would random iter members. Please sort the list yourself if the fixed order was expected.

func (*IntSet) Union

func (s *IntSet) Union(sets ...*IntSet) *IntSet

Union returns the members of the set resulting from the union of all the given sets

type Set

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

Set was the set structure for interface{} type

func NewSet

func NewSet(members ...interface{}) *Set

NewSet would create a new interface{} set with members

func NewThreadSafeSet

func NewThreadSafeSet(members ...interface{}) *Set

NewThreadSafeSet was thread safe set that allows concurrent access between the goroutines

func (*Set) Add

func (s *Set) Add(member interface{}) bool

Add would add the member into the set return true is the member was not exists

func (*Set) Card

func (s *Set) Card() int

Card returns the set cardinality (number of elements) of the set

func (*Set) Contains

func (s *Set) Contains(member interface{}) bool

Contains was used to check whether the member was existed in set or not

func (*Set) ContainsAny

func (s *Set) ContainsAny(members ...interface{}) bool

ContainsAny was used to check any members were existed in set

func (*Set) Diff

func (s *Set) Diff(sets ...*Set) *Set

Diff returns the members of the set resulting from the difference between the first set and all the successive sets

func (*Set) Equal

func (s *Set) Equal(targetSet *Set) bool

Equal was used to check whether the members are the same

func (*Set) In

func (s *Set) In(targetSet *Set) bool

In was used to check if all the set members was contains by targetSet, empty set would be always in other set.

func (*Set) Inter

func (s *Set) Inter(sets ...*Set) *Set

Inter returns the members of the set resulting from the intersection of all the given sets

func (*Set) Remove

func (s *Set) Remove(member interface{}) bool

Remove would delete the member for the set if exists return true when the member was existed

func (*Set) ToList

func (s *Set) ToList() []interface{}

ToList would return the list of set members the undetermined order, since we use the map iterator that would random iter members. Please sort the list yourself if the fixed order was expected.

func (*Set) Union

func (s *Set) Union(sets ...*Set) *Set

Union returns the members of the set resulting from the union of all the given sets

type StringSet

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

StringSet was the set structure for string type

func NewStringSet

func NewStringSet(members ...string) *StringSet

NewStringSet would create a new string set with members

func NewThreadSafeStringSet

func NewThreadSafeStringSet(members ...string) *StringSet

NewThreadSafeStringSet was thread safe set that allows concurrent access between the goroutines

func (*StringSet) Add

func (s *StringSet) Add(member string) bool

Add would add the member into the set return true is the member was not exists

func (*StringSet) Card

func (s *StringSet) Card() int

Card returns the set cardinality (number of elements) of the set

func (*StringSet) Contains

func (s *StringSet) Contains(member string) bool

Contains was used to check whether the member was existed in set or not

func (*StringSet) ContainsAny

func (s *StringSet) ContainsAny(members ...string) bool

ContainsAny was used to check any members were existed in set

func (*StringSet) Diff

func (s *StringSet) Diff(sets ...*StringSet) *StringSet

Diff returns the members of the set resulting from the difference between the first set and all the successive sets

func (*StringSet) Equal

func (s *StringSet) Equal(targetSet *StringSet) bool

Equal was used to check whether the members are the same

func (*StringSet) In

func (s *StringSet) In(targetSet *StringSet) bool

In was used to check if all the set members was contains by targetSet, empty set would be always in other set.

func (*StringSet) Inter

func (s *StringSet) Inter(sets ...*StringSet) *StringSet

Inter returns the members of the set resulting from the intersection of all the given sets

func (*StringSet) Remove

func (s *StringSet) Remove(member string) bool

Remove would delete the member for the set if exists return true when the member was existed

func (*StringSet) ToList

func (s *StringSet) ToList() []string

ToList would return the list of set members the undetermined order, since we use the map iterator that would random iter members. Please sort the list yourself if the fixed order was expected.

func (*StringSet) Union

func (s *StringSet) Union(sets ...*StringSet) *StringSet

Union returns the members of the set resulting from the union of all the given sets

type Uint16Set

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

Uint16Set was the set structure for uint16 type

func NewThreadSafeUint16Set

func NewThreadSafeUint16Set(members ...uint16) *Uint16Set

NewThreadSafeUint16Set was thread safe set that allows concurrent access between the goroutines

func NewUint16Set

func NewUint16Set(members ...uint16) *Uint16Set

NewUint16Set would create a new uint16 set with members

func (*Uint16Set) Add

func (s *Uint16Set) Add(member uint16) bool

Add would add the member into the set return true is the member was not exists

func (*Uint16Set) Card

func (s *Uint16Set) Card() int

Card returns the set cardinality (number of elements) of the set

func (*Uint16Set) Contains

func (s *Uint16Set) Contains(member uint16) bool

Contains was used to check whether the member was existed in set or not

func (*Uint16Set) ContainsAny

func (s *Uint16Set) ContainsAny(members ...uint16) bool

ContainsAny was used to check any members were existed in set

func (*Uint16Set) Diff

func (s *Uint16Set) Diff(sets ...*Uint16Set) *Uint16Set

Diff returns the members of the set resulting from the difference between the first set and all the successive sets

func (*Uint16Set) Equal

func (s *Uint16Set) Equal(targetSet *Uint16Set) bool

Equal was used to check whether the members are the same

func (*Uint16Set) In

func (s *Uint16Set) In(targetSet *Uint16Set) bool

In was used to check if all the set members was contains by targetSet, empty set would be always in other set.

func (*Uint16Set) Inter

func (s *Uint16Set) Inter(sets ...*Uint16Set) *Uint16Set

Inter returns the members of the set resulting from the intersection of all the given sets

func (*Uint16Set) Remove

func (s *Uint16Set) Remove(member uint16) bool

Remove would delete the member for the set if exists return true when the member was existed

func (*Uint16Set) ToList

func (s *Uint16Set) ToList() []uint16

ToList would return the list of set members the undetermined order, since we use the map iterator that would random iter members. Please sort the list yourself if the fixed order was expected.

func (*Uint16Set) Union

func (s *Uint16Set) Union(sets ...*Uint16Set) *Uint16Set

Union returns the members of the set resulting from the union of all the given sets

type Uint32Set

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

Uint32Set was the set structure for uint32 type

func NewThreadSafeUint32Set

func NewThreadSafeUint32Set(members ...uint32) *Uint32Set

NewThreadSafeUint32Set was thread safe set that allows concurrent access between the goroutines

func NewUint32Set

func NewUint32Set(members ...uint32) *Uint32Set

NewUint32Set would create a new uint32 set with members

func (*Uint32Set) Add

func (s *Uint32Set) Add(member uint32) bool

Add would add the member into the set return true is the member was not exists

func (*Uint32Set) Card

func (s *Uint32Set) Card() int

Card returns the set cardinality (number of elements) of the set

func (*Uint32Set) Contains

func (s *Uint32Set) Contains(member uint32) bool

Contains was used to check whether the member was existed in set or not

func (*Uint32Set) ContainsAny

func (s *Uint32Set) ContainsAny(members ...uint32) bool

ContainsAny was used to check any members were existed in set

func (*Uint32Set) Diff

func (s *Uint32Set) Diff(sets ...*Uint32Set) *Uint32Set

Diff returns the members of the set resulting from the difference between the first set and all the successive sets

func (*Uint32Set) Equal

func (s *Uint32Set) Equal(targetSet *Uint32Set) bool

Equal was used to check whether the members are the same

func (*Uint32Set) In

func (s *Uint32Set) In(targetSet *Uint32Set) bool

In was used to check if all the set members was contains by targetSet, empty set would be always in other set.

func (*Uint32Set) Inter

func (s *Uint32Set) Inter(sets ...*Uint32Set) *Uint32Set

Inter returns the members of the set resulting from the intersection of all the given sets

func (*Uint32Set) Remove

func (s *Uint32Set) Remove(member uint32) bool

Remove would delete the member for the set if exists return true when the member was existed

func (*Uint32Set) ToList

func (s *Uint32Set) ToList() []uint32

ToList would return the list of set members the undetermined order, since we use the map iterator that would random iter members. Please sort the list yourself if the fixed order was expected.

func (*Uint32Set) Union

func (s *Uint32Set) Union(sets ...*Uint32Set) *Uint32Set

Union returns the members of the set resulting from the union of all the given sets

type Uint64Set

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

Uint64Set was the set structure for uint64 type

func NewThreadSafeUint64Set

func NewThreadSafeUint64Set(members ...uint64) *Uint64Set

NewThreadSafeUint64Set was thread safe set that allows concurrent access between the goroutines

func NewUint64Set

func NewUint64Set(members ...uint64) *Uint64Set

NewUint64Set would create a new uint64 set with members

func (*Uint64Set) Add

func (s *Uint64Set) Add(member uint64) bool

Add would add the member into the set return true is the member was not exists

func (*Uint64Set) Card

func (s *Uint64Set) Card() int

Card returns the set cardinality (number of elements) of the set

func (*Uint64Set) Contains

func (s *Uint64Set) Contains(member uint64) bool

Contains was used to check whether the member was existed in set or not

func (*Uint64Set) ContainsAny

func (s *Uint64Set) ContainsAny(members ...uint64) bool

ContainsAny was used to check any members were existed in set

func (*Uint64Set) Diff

func (s *Uint64Set) Diff(sets ...*Uint64Set) *Uint64Set

Diff returns the members of the set resulting from the difference between the first set and all the successive sets

func (*Uint64Set) Equal

func (s *Uint64Set) Equal(targetSet *Uint64Set) bool

Equal was used to check whether the members are the same

func (*Uint64Set) In

func (s *Uint64Set) In(targetSet *Uint64Set) bool

In was used to check if all the set members was contains by targetSet, empty set would be always in other set.

func (*Uint64Set) Inter

func (s *Uint64Set) Inter(sets ...*Uint64Set) *Uint64Set

Inter returns the members of the set resulting from the intersection of all the given sets

func (*Uint64Set) Remove

func (s *Uint64Set) Remove(member uint64) bool

Remove would delete the member for the set if exists return true when the member was existed

func (*Uint64Set) ToList

func (s *Uint64Set) ToList() []uint64

ToList would return the list of set members the undetermined order, since we use the map iterator that would random iter members. Please sort the list yourself if the fixed order was expected.

func (*Uint64Set) Union

func (s *Uint64Set) Union(sets ...*Uint64Set) *Uint64Set

Union returns the members of the set resulting from the union of all the given sets

type Uint8Set

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

Uint8Set was the set structure for uint8 type

func NewThreadSafeUint8Set

func NewThreadSafeUint8Set(members ...uint8) *Uint8Set

NewThreadSafeUint8Set was thread safe set that allows concurrent access between the goroutines

func NewUint8Set

func NewUint8Set(members ...uint8) *Uint8Set

NewUint8Set would create a new uint8 set with members

func (*Uint8Set) Add

func (s *Uint8Set) Add(member uint8) bool

Add would add the member into the set return true is the member was not exists

func (*Uint8Set) Card

func (s *Uint8Set) Card() int

Card returns the set cardinality (number of elements) of the set

func (*Uint8Set) Contains

func (s *Uint8Set) Contains(member uint8) bool

Contains was used to check whether the member was existed in set or not

func (*Uint8Set) ContainsAny

func (s *Uint8Set) ContainsAny(members ...uint8) bool

ContainsAny was used to check any members were existed in set

func (*Uint8Set) Diff

func (s *Uint8Set) Diff(sets ...*Uint8Set) *Uint8Set

Diff returns the members of the set resulting from the difference between the first set and all the successive sets

func (*Uint8Set) Equal

func (s *Uint8Set) Equal(targetSet *Uint8Set) bool

Equal was used to check whether the members are the same

func (*Uint8Set) In

func (s *Uint8Set) In(targetSet *Uint8Set) bool

In was used to check if all the set members was contains by targetSet, empty set would be always in other set.

func (*Uint8Set) Inter

func (s *Uint8Set) Inter(sets ...*Uint8Set) *Uint8Set

Inter returns the members of the set resulting from the intersection of all the given sets

func (*Uint8Set) Remove

func (s *Uint8Set) Remove(member uint8) bool

Remove would delete the member for the set if exists return true when the member was existed

func (*Uint8Set) ToList

func (s *Uint8Set) ToList() []uint8

ToList would return the list of set members the undetermined order, since we use the map iterator that would random iter members. Please sort the list yourself if the fixed order was expected.

func (*Uint8Set) Union

func (s *Uint8Set) Union(sets ...*Uint8Set) *Uint8Set

Union returns the members of the set resulting from the union of all the given sets

type UintSet

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

UintSet was the set structure for uint type

func NewThreadSafeUintSet

func NewThreadSafeUintSet(members ...uint) *UintSet

NewThreadSafeUintSet was thread safe set that allows concurrent access between the goroutines

func NewUintSet

func NewUintSet(members ...uint) *UintSet

NewUintSet would create a new uint set with members

func (*UintSet) Add

func (s *UintSet) Add(member uint) bool

Add would add the member into the set return true is the member was not exists

func (*UintSet) Card

func (s *UintSet) Card() int

Card returns the set cardinality (number of elements) of the set

func (*UintSet) Contains

func (s *UintSet) Contains(member uint) bool

Contains was used to check whether the member was existed in set or not

func (*UintSet) ContainsAny

func (s *UintSet) ContainsAny(members ...uint) bool

ContainsAny was used to check any members were existed in set

func (*UintSet) Diff

func (s *UintSet) Diff(sets ...*UintSet) *UintSet

Diff returns the members of the set resulting from the difference between the first set and all the successive sets

func (*UintSet) Equal

func (s *UintSet) Equal(targetSet *UintSet) bool

Equal was used to check whether the members are the same

func (*UintSet) In

func (s *UintSet) In(targetSet *UintSet) bool

In was used to check if all the set members was contains by targetSet, empty set would be always in other set.

func (*UintSet) Inter

func (s *UintSet) Inter(sets ...*UintSet) *UintSet

Inter returns the members of the set resulting from the intersection of all the given sets

func (*UintSet) Remove

func (s *UintSet) Remove(member uint) bool

Remove would delete the member for the set if exists return true when the member was existed

func (*UintSet) ToList

func (s *UintSet) ToList() []uint

ToList would return the list of set members the undetermined order, since we use the map iterator that would random iter members. Please sort the list yourself if the fixed order was expected.

func (*UintSet) Union

func (s *UintSet) Union(sets ...*UintSet) *UintSet

Union returns the members of the set resulting from the union of all the given sets

Jump to

Keyboard shortcuts

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