Documentation ¶
Overview ¶
Package set implements a set backed by a hash map.
Reference: https://en.wikipedia.org/wiki/Set_%28abstract_data_type%29
Package set implements a set backed by a hash map.
Reference: https://en.wikipedia.org/wiki/Set_%28abstract_data_type%29
Package set implements a set backed by a hash map.
Reference: https://en.wikipedia.org/wiki/Set_%28abstract_data_type%29
Package set implements a set backed by a hash map.
Reference: https://en.wikipedia.org/wiki/Set_%28abstract_data_type%29
Package set implements a set backed by a hash map.
Reference: https://en.wikipedia.org/wiki/Set_%28abstract_data_type%29
Package set implements a set backed by a hash map.
Reference: https://en.wikipedia.org/wiki/Set_%28abstract_data_type%29
Package set implements a set backed by a hash map.
Reference: https://en.wikipedia.org/wiki/Set_%28abstract_data_type%29
Package set implements a set backed by a hash map.
Reference: https://en.wikipedia.org/wiki/Set_%28abstract_data_type%29
Package set implements a set backed by a hash map.
Reference: https://en.wikipedia.org/wiki/Set_%28abstract_data_type%29
Package set implements a set backed by a hash map.
Reference: https://en.wikipedia.org/wiki/Set_%28abstract_data_type%29
Package set implements a set backed by a hash map.
Reference: https://en.wikipedia.org/wiki/Set_%28abstract_data_type%29
Package set implements a set backed by a hash map.
Reference: https://en.wikipedia.org/wiki/Set_%28abstract_data_type%29
Package set implements a set backed by a hash map.
Reference: https://en.wikipedia.org/wiki/Set_%28abstract_data_type%29
Package set implements a set backed by a hash map.
Reference: https://en.wikipedia.org/wiki/Set_%28abstract_data_type%29
Package set implements a set backed by a hash map.
Reference: https://en.wikipedia.org/wiki/Set_%28abstract_data_type%29
Package set implements a set backed by a hash map.
Reference: https://en.wikipedia.org/wiki/Set_%28abstract_data_type%29
Package set implements a set backed by a hash map.
Reference: https://en.wikipedia.org/wiki/Set_%28abstract_data_type%29
Index ¶
- Variables
- type Float32
- func (s Float32) Add(elements ...float32)
- func (s *Float32) Clear()
- func (s Float32) Copy() Float32
- func (s Float32) Difference(t Float32) Float32
- func (s Float32) Each(do func(i float32))
- func (s Float32) EachE(do func(i float32) error) error
- func (s Float32) Equal(t Float32) bool
- func (s Float32) Has(element float32) bool
- func (s Float32) HasAll(elements ...float32) bool
- func (s Float32) HasAny(elements ...float32) bool
- func (s Float32) Intersection(t Float32) Float32
- func (s Float32) IsEmpty() bool
- func (s Float32) IsSubset(t Float32) bool
- func (s Float32) IsSuperset(t Float32) bool
- func (s Float32) List() []float32
- func (s Float32) Pop() (float32, bool)
- func (s Float32) Remove(elements ...float32)
- func (s Float32) Size() int
- func (s Float32) SortedList(less func(i, j float32) bool) []float32
- func (s Float32) String() string
- func (s Float32) SymmetricDifference(t Float32) Float32
- func (s Float32) Union(t Float32) Float32
- type Float64
- func (s Float64) Add(elements ...float64)
- func (s *Float64) Clear()
- func (s Float64) Copy() Float64
- func (s Float64) Difference(t Float64) Float64
- func (s Float64) Each(do func(i float64))
- func (s Float64) EachE(do func(i float64) error) error
- func (s Float64) Equal(t Float64) bool
- func (s Float64) Has(element float64) bool
- func (s Float64) HasAll(elements ...float64) bool
- func (s Float64) HasAny(elements ...float64) bool
- func (s Float64) Intersection(t Float64) Float64
- func (s Float64) IsEmpty() bool
- func (s Float64) IsSubset(t Float64) bool
- func (s Float64) IsSuperset(t Float64) bool
- func (s Float64) List() []float64
- func (s Float64) Pop() (float64, bool)
- func (s Float64) Remove(elements ...float64)
- func (s Float64) Size() int
- func (s Float64) SortedList(less func(i, j float64) bool) []float64
- func (s Float64) String() string
- func (s Float64) SymmetricDifference(t Float64) Float64
- func (s Float64) Union(t Float64) Float64
- type Int
- func (s Int) Add(elements ...int)
- func (s *Int) Clear()
- func (s Int) Copy() Int
- func (s Int) Difference(t Int) Int
- func (s Int) Each(do func(i int))
- func (s Int) EachE(do func(i int) error) error
- func (s Int) Equal(t Int) bool
- func (s Int) Has(element int) bool
- func (s Int) HasAll(elements ...int) bool
- func (s Int) HasAny(elements ...int) bool
- func (s Int) Intersection(t Int) Int
- func (s Int) IsEmpty() bool
- func (s Int) IsSubset(t Int) bool
- func (s Int) IsSuperset(t Int) bool
- func (s Int) List() []int
- func (s Int) Pop() (int, bool)
- func (s Int) Remove(elements ...int)
- func (s Int) Size() int
- func (s Int) SortedList(less func(i, j int) bool) []int
- func (s Int) String() string
- func (s Int) SymmetricDifference(t Int) Int
- func (s Int) Union(t Int) Int
- type Int16
- func (s Int16) Add(elements ...int16)
- func (s *Int16) Clear()
- func (s Int16) Copy() Int16
- func (s Int16) Difference(t Int16) Int16
- func (s Int16) Each(do func(i int16))
- func (s Int16) EachE(do func(i int16) error) error
- func (s Int16) Equal(t Int16) bool
- func (s Int16) Has(element int16) bool
- func (s Int16) HasAll(elements ...int16) bool
- func (s Int16) HasAny(elements ...int16) bool
- func (s Int16) Intersection(t Int16) Int16
- func (s Int16) IsEmpty() bool
- func (s Int16) IsSubset(t Int16) bool
- func (s Int16) IsSuperset(t Int16) bool
- func (s Int16) List() []int16
- func (s Int16) Pop() (int16, bool)
- func (s Int16) Remove(elements ...int16)
- func (s Int16) Size() int
- func (s Int16) SortedList(less func(i, j int16) bool) []int16
- func (s Int16) String() string
- func (s Int16) SymmetricDifference(t Int16) Int16
- func (s Int16) Union(t Int16) Int16
- type Int32
- func (s Int32) Add(elements ...int32)
- func (s *Int32) Clear()
- func (s Int32) Copy() Int32
- func (s Int32) Difference(t Int32) Int32
- func (s Int32) Each(do func(i int32))
- func (s Int32) EachE(do func(i int32) error) error
- func (s Int32) Equal(t Int32) bool
- func (s Int32) Has(element int32) bool
- func (s Int32) HasAll(elements ...int32) bool
- func (s Int32) HasAny(elements ...int32) bool
- func (s Int32) Intersection(t Int32) Int32
- func (s Int32) IsEmpty() bool
- func (s Int32) IsSubset(t Int32) bool
- func (s Int32) IsSuperset(t Int32) bool
- func (s Int32) List() []int32
- func (s Int32) Pop() (int32, bool)
- func (s Int32) Remove(elements ...int32)
- func (s Int32) Size() int
- func (s Int32) SortedList(less func(i, j int32) bool) []int32
- func (s Int32) String() string
- func (s Int32) SymmetricDifference(t Int32) Int32
- func (s Int32) Union(t Int32) Int32
- type Int64
- func (s Int64) Add(elements ...int64)
- func (s *Int64) Clear()
- func (s Int64) Copy() Int64
- func (s Int64) Difference(t Int64) Int64
- func (s Int64) Each(do func(i int64))
- func (s Int64) EachE(do func(i int64) error) error
- func (s Int64) Equal(t Int64) bool
- func (s Int64) Has(element int64) bool
- func (s Int64) HasAll(elements ...int64) bool
- func (s Int64) HasAny(elements ...int64) bool
- func (s Int64) Intersection(t Int64) Int64
- func (s Int64) IsEmpty() bool
- func (s Int64) IsSubset(t Int64) bool
- func (s Int64) IsSuperset(t Int64) bool
- func (s Int64) List() []int64
- func (s Int64) Pop() (int64, bool)
- func (s Int64) Remove(elements ...int64)
- func (s Int64) Size() int
- func (s Int64) SortedList(less func(i, j int64) bool) []int64
- func (s Int64) String() string
- func (s Int64) SymmetricDifference(t Int64) Int64
- func (s Int64) Union(t Int64) Int64
- type Int8
- func (s Int8) Add(elements ...int8)
- func (s *Int8) Clear()
- func (s Int8) Copy() Int8
- func (s Int8) Difference(t Int8) Int8
- func (s Int8) Each(do func(i int8))
- func (s Int8) EachE(do func(i int8) error) error
- func (s Int8) Equal(t Int8) bool
- func (s Int8) Has(element int8) bool
- func (s Int8) HasAll(elements ...int8) bool
- func (s Int8) HasAny(elements ...int8) bool
- func (s Int8) Intersection(t Int8) Int8
- func (s Int8) IsEmpty() bool
- func (s Int8) IsSubset(t Int8) bool
- func (s Int8) IsSuperset(t Int8) bool
- func (s Int8) List() []int8
- func (s Int8) Pop() (int8, bool)
- func (s Int8) Remove(elements ...int8)
- func (s Int8) Size() int
- func (s Int8) SortedList(less func(i, j int8) bool) []int8
- func (s Int8) String() string
- func (s Int8) SymmetricDifference(t Int8) Int8
- func (s Int8) Union(t Int8) Int8
- type Interface
- func (s Interface) Add(elements ...interface{})
- func (s *Interface) Clear()
- func (s Interface) Copy() Interface
- func (s Interface) Difference(t Interface) Interface
- func (s Interface) Each(do func(i interface{}))
- func (s Interface) EachE(do func(i interface{}) error) error
- func (s Interface) Equal(t Interface) bool
- func (s Interface) Has(element interface{}) bool
- func (s Interface) HasAll(elements ...interface{}) bool
- func (s Interface) HasAny(elements ...interface{}) bool
- func (s Interface) Intersection(t Interface) Interface
- func (s Interface) IsEmpty() bool
- func (s Interface) IsSubset(t Interface) bool
- func (s Interface) IsSuperset(t Interface) bool
- func (s Interface) List() []interface{}
- func (s Interface) Pop() (interface{}, bool)
- func (s Interface) Remove(elements ...interface{})
- func (s Interface) Size() int
- func (s Interface) SortedList(less func(i, j interface{}) bool) []interface{}
- func (s Interface) String() string
- func (s Interface) SymmetricDifference(t Interface) Interface
- func (s Interface) Union(t Interface) Interface
- type String
- func (s String) Add(elements ...string)
- func (s *String) Clear()
- func (s String) Copy() String
- func (s String) Difference(t String) String
- func (s String) Each(do func(i string))
- func (s String) EachE(do func(i string) error) error
- func (s String) Equal(t String) bool
- func (s String) Has(element string) bool
- func (s String) HasAll(elements ...string) bool
- func (s String) HasAny(elements ...string) bool
- func (s String) Intersection(t String) String
- func (s String) IsEmpty() bool
- func (s String) IsSubset(t String) bool
- func (s String) IsSuperset(t String) bool
- func (s String) List() []string
- func (s String) Pop() (string, bool)
- func (s String) Remove(elements ...string)
- func (s String) Size() int
- func (s String) SortedList(less func(i, j string) bool) []string
- func (s String) String() string
- func (s String) SymmetricDifference(t String) String
- func (s String) Union(t String) String
- type Uint
- func (s Uint) Add(elements ...uint)
- func (s *Uint) Clear()
- func (s Uint) Copy() Uint
- func (s Uint) Difference(t Uint) Uint
- func (s Uint) Each(do func(i uint))
- func (s Uint) EachE(do func(i uint) error) error
- func (s Uint) Equal(t Uint) bool
- func (s Uint) Has(element uint) bool
- func (s Uint) HasAll(elements ...uint) bool
- func (s Uint) HasAny(elements ...uint) bool
- func (s Uint) Intersection(t Uint) Uint
- func (s Uint) IsEmpty() bool
- func (s Uint) IsSubset(t Uint) bool
- func (s Uint) IsSuperset(t Uint) bool
- func (s Uint) List() []uint
- func (s Uint) Pop() (uint, bool)
- func (s Uint) Remove(elements ...uint)
- func (s Uint) Size() int
- func (s Uint) SortedList(less func(i, j uint) bool) []uint
- func (s Uint) String() string
- func (s Uint) SymmetricDifference(t Uint) Uint
- func (s Uint) Union(t Uint) Uint
- type Uint16
- func (s Uint16) Add(elements ...uint16)
- func (s *Uint16) Clear()
- func (s Uint16) Copy() Uint16
- func (s Uint16) Difference(t Uint16) Uint16
- func (s Uint16) Each(do func(i uint16))
- func (s Uint16) EachE(do func(i uint16) error) error
- func (s Uint16) Equal(t Uint16) bool
- func (s Uint16) Has(element uint16) bool
- func (s Uint16) HasAll(elements ...uint16) bool
- func (s Uint16) HasAny(elements ...uint16) bool
- func (s Uint16) Intersection(t Uint16) Uint16
- func (s Uint16) IsEmpty() bool
- func (s Uint16) IsSubset(t Uint16) bool
- func (s Uint16) IsSuperset(t Uint16) bool
- func (s Uint16) List() []uint16
- func (s Uint16) Pop() (uint16, bool)
- func (s Uint16) Remove(elements ...uint16)
- func (s Uint16) Size() int
- func (s Uint16) SortedList(less func(i, j uint16) bool) []uint16
- func (s Uint16) String() string
- func (s Uint16) SymmetricDifference(t Uint16) Uint16
- func (s Uint16) Union(t Uint16) Uint16
- type Uint32
- func (s Uint32) Add(elements ...uint32)
- func (s *Uint32) Clear()
- func (s Uint32) Copy() Uint32
- func (s Uint32) Difference(t Uint32) Uint32
- func (s Uint32) Each(do func(i uint32))
- func (s Uint32) EachE(do func(i uint32) error) error
- func (s Uint32) Equal(t Uint32) bool
- func (s Uint32) Has(element uint32) bool
- func (s Uint32) HasAll(elements ...uint32) bool
- func (s Uint32) HasAny(elements ...uint32) bool
- func (s Uint32) Intersection(t Uint32) Uint32
- func (s Uint32) IsEmpty() bool
- func (s Uint32) IsSubset(t Uint32) bool
- func (s Uint32) IsSuperset(t Uint32) bool
- func (s Uint32) List() []uint32
- func (s Uint32) Pop() (uint32, bool)
- func (s Uint32) Remove(elements ...uint32)
- func (s Uint32) Size() int
- func (s Uint32) SortedList(less func(i, j uint32) bool) []uint32
- func (s Uint32) String() string
- func (s Uint32) SymmetricDifference(t Uint32) Uint32
- func (s Uint32) Union(t Uint32) Uint32
- type Uint64
- func (s Uint64) Add(elements ...uint64)
- func (s *Uint64) Clear()
- func (s Uint64) Copy() Uint64
- func (s Uint64) Difference(t Uint64) Uint64
- func (s Uint64) Each(do func(i uint64))
- func (s Uint64) EachE(do func(i uint64) error) error
- func (s Uint64) Equal(t Uint64) bool
- func (s Uint64) Has(element uint64) bool
- func (s Uint64) HasAll(elements ...uint64) bool
- func (s Uint64) HasAny(elements ...uint64) bool
- func (s Uint64) Intersection(t Uint64) Uint64
- func (s Uint64) IsEmpty() bool
- func (s Uint64) IsSubset(t Uint64) bool
- func (s Uint64) IsSuperset(t Uint64) bool
- func (s Uint64) List() []uint64
- func (s Uint64) Pop() (uint64, bool)
- func (s Uint64) Remove(elements ...uint64)
- func (s Uint64) Size() int
- func (s Uint64) SortedList(less func(i, j uint64) bool) []uint64
- func (s Uint64) String() string
- func (s Uint64) SymmetricDifference(t Uint64) Uint64
- func (s Uint64) Union(t Uint64) Uint64
- type Uint8
- func (s Uint8) Add(elements ...uint8)
- func (s *Uint8) Clear()
- func (s Uint8) Copy() Uint8
- func (s Uint8) Difference(t Uint8) Uint8
- func (s Uint8) Each(do func(i uint8))
- func (s Uint8) EachE(do func(i uint8) error) error
- func (s Uint8) Equal(t Uint8) bool
- func (s Uint8) Has(element uint8) bool
- func (s Uint8) HasAll(elements ...uint8) bool
- func (s Uint8) HasAny(elements ...uint8) bool
- func (s Uint8) Intersection(t Uint8) Uint8
- func (s Uint8) IsEmpty() bool
- func (s Uint8) IsSubset(t Uint8) bool
- func (s Uint8) IsSuperset(t Uint8) bool
- func (s Uint8) List() []uint8
- func (s Uint8) Pop() (uint8, bool)
- func (s Uint8) Remove(elements ...uint8)
- func (s Uint8) Size() int
- func (s Uint8) SortedList(less func(i, j uint8) bool) []uint8
- func (s Uint8) String() string
- func (s Uint8) SymmetricDifference(t Uint8) Uint8
- func (s Uint8) Union(t Uint8) Uint8
- type Uintptr
- func (s Uintptr) Add(elements ...uintptr)
- func (s *Uintptr) Clear()
- func (s Uintptr) Copy() Uintptr
- func (s Uintptr) Difference(t Uintptr) Uintptr
- func (s Uintptr) Each(do func(i uintptr))
- func (s Uintptr) EachE(do func(i uintptr) error) error
- func (s Uintptr) Equal(t Uintptr) bool
- func (s Uintptr) Has(element uintptr) bool
- func (s Uintptr) HasAll(elements ...uintptr) bool
- func (s Uintptr) HasAny(elements ...uintptr) bool
- func (s Uintptr) Intersection(t Uintptr) Uintptr
- func (s Uintptr) IsEmpty() bool
- func (s Uintptr) IsSubset(t Uintptr) bool
- func (s Uintptr) IsSuperset(t Uintptr) bool
- func (s Uintptr) List() []uintptr
- func (s Uintptr) Pop() (uintptr, bool)
- func (s Uintptr) Remove(elements ...uintptr)
- func (s Uintptr) Size() int
- func (s Uintptr) SortedList(less func(i, j uintptr) bool) []uintptr
- func (s Uintptr) String() string
- func (s Uintptr) SymmetricDifference(t Uintptr) Uintptr
- func (s Uintptr) Union(t Uintptr) Uintptr
Constants ¶
This section is empty.
Variables ¶
var ErrBreakEach = errors.New("break each func")
ErrBreakEach breaks that the EachE traverses the elements in the set.
Functions ¶
This section is empty.
Types ¶
type Float32 ¶
type Float32 map[float32]struct{}
Float32 is a float32 collection that contains no duplicate elements, without any particular order. It supports typical set operations: Core set-theoretical operations, Static sets, Dynamic sets, Additional operations.
func NewFloat32 ¶
NewFloat32 initializes a new Float32.
func NewFloat32WithSize ¶
NewFloat32WithSize initializes a new Float32 with the specified size.
func (Float32) Difference ¶
Difference returns the difference of Float32 s and t. For example: s = {a, b, c} s = {a, c, d, e, f} s.Difference(s) = {b} s.Difference(s) = {d, e, f}
func (Float32) Each ¶
Each traverses the elements in the Float32, calling do func for each Float32 member.
func (Float32) EachE ¶
EachE traverses the elements in the Float32, calling do func for each Float32 member. the cycle will be stopped when the do func returns error. if err is ErrBreakEach, break the cycle and return nil, else, break the cycle and return error.
func (Float32) Equal ¶
Equal predicates that tests whether the Float32 s equals of Float32 t. For example: s equals of s s = {a, b, c} s = {a, b, c} s does not equal of s s = {a, f} s = {a, b, c, d}
func (Float32) Has ¶
Has judges the specified element whether exists in the Float32. it returns true if existed, and false if not.
func (Float32) HasAll ¶
HasAll looks for the specified elements to judge whether all exist in the Float32. it returns true if existed, and false if not.
func (Float32) HasAny ¶
HasAny looks for the specified elements to judge whether at least one of the element exists in the Float32. it returns true if existed, and false if not.
func (Float32) Intersection ¶
Intersection returns the intersection of Float32 s and t. For example: s = {a, b, c} s = {a, c, d, e, f} s.Intersection(s) = {a, c} s.Intersection(s) = {a, c} s.Intersection(s) = s.Intersection(s)
func (Float32) IsSubset ¶
IsSubset predicates that tests whether the Float32 s is a subset of Float32 t. For example: s is subset of s s = {a, b, c} s = {a, b, c, d} s is not subset of s s = {a, f} s = {a, b, c, d}
func (Float32) IsSuperset ¶
IsSuperset predicates that tests whether the Float32 s is a super of Float32 t. For example: s is super of s s = {a, b, c, d} s = {a, b, c} s is not super of s s = {a, f} s = {a, b, c, d}
func (Float32) Pop ¶
Pop returns an arbitrary element of Float32, deleting it from Float32. The second value is a bool that is true if the elements existed in the Float32, and false if not.
func (Float32) SortedList ¶
SortedList returns the all elements as a slice sorted by less func.
func (Float32) SymmetricDifference ¶
SymmetricDifference returns a new Float32 with the elements that are either in this Float32 or in the given Float32, but not in both. For example: s = {a, c} s = {a, b, d} s.SymmetricDifference(s) = {c, b, d} s.SymmetricDifference(s) = {c, b, d} s.SymmetricDifference(s) = s.SymmetricDifference(s)
type Float64 ¶
type Float64 map[float64]struct{}
Float64 is a float64 collection that contains no duplicate elements, without any particular order. It supports typical set operations: Core set-theoretical operations, Static sets, Dynamic sets, Additional operations.
func NewFloat64 ¶
NewFloat64 initializes a new Float64.
func NewFloat64WithSize ¶
NewFloat64WithSize initializes a new Float64 with the specified size.
func (Float64) Difference ¶
Difference returns the difference of Float64 s and t. For example: s = {a, b, c} s = {a, c, d, e, f} s.Difference(s) = {b} s.Difference(s) = {d, e, f}
func (Float64) Each ¶
Each traverses the elements in the Float64, calling do func for each Float64 member.
func (Float64) EachE ¶
EachE traverses the elements in the Float64, calling do func for each Float64 member. the cycle will be stopped when the do func returns error. if err is ErrBreakEach, break the cycle and return nil, else, break the cycle and return error.
func (Float64) Equal ¶
Equal predicates that tests whether the Float64 s equals of Float64 t. For example: s equals of s s = {a, b, c} s = {a, b, c} s does not equal of s s = {a, f} s = {a, b, c, d}
func (Float64) Has ¶
Has judges the specified element whether exists in the Float64. it returns true if existed, and false if not.
func (Float64) HasAll ¶
HasAll looks for the specified elements to judge whether all exist in the Float64. it returns true if existed, and false if not.
func (Float64) HasAny ¶
HasAny looks for the specified elements to judge whether at least one of the element exists in the Float64. it returns true if existed, and false if not.
func (Float64) Intersection ¶
Intersection returns the intersection of Float64 s and t. For example: s = {a, b, c} s = {a, c, d, e, f} s.Intersection(s) = {a, c} s.Intersection(s) = {a, c} s.Intersection(s) = s.Intersection(s)
func (Float64) IsSubset ¶
IsSubset predicates that tests whether the Float64 s is a subset of Float64 t. For example: s is subset of s s = {a, b, c} s = {a, b, c, d} s is not subset of s s = {a, f} s = {a, b, c, d}
func (Float64) IsSuperset ¶
IsSuperset predicates that tests whether the Float64 s is a super of Float64 t. For example: s is super of s s = {a, b, c, d} s = {a, b, c} s is not super of s s = {a, f} s = {a, b, c, d}
func (Float64) Pop ¶
Pop returns an arbitrary element of Float64, deleting it from Float64. The second value is a bool that is true if the elements existed in the Float64, and false if not.
func (Float64) SortedList ¶
SortedList returns the all elements as a slice sorted by less func.
func (Float64) SymmetricDifference ¶
SymmetricDifference returns a new Float64 with the elements that are either in this Float64 or in the given Float64, but not in both. For example: s = {a, c} s = {a, b, d} s.SymmetricDifference(s) = {c, b, d} s.SymmetricDifference(s) = {c, b, d} s.SymmetricDifference(s) = s.SymmetricDifference(s)
type Int ¶
type Int map[int]struct{}
Int is a int collection that contains no duplicate elements, without any particular order. It supports typical set operations: Core set-theoretical operations, Static sets, Dynamic sets, Additional operations.
func NewIntWithSize ¶
NewIntWithSize initializes a new Int with the specified size.
func (Int) Difference ¶
Difference returns the difference of Int s and t. For example: s = {a, b, c} s = {a, c, d, e, f} s.Difference(s) = {b} s.Difference(s) = {d, e, f}
func (Int) EachE ¶
EachE traverses the elements in the Int, calling do func for each Int member. the cycle will be stopped when the do func returns error. if err is ErrBreakEach, break the cycle and return nil, else, break the cycle and return error.
func (Int) Equal ¶
Equal predicates that tests whether the Int s equals of Int t. For example: s equals of s s = {a, b, c} s = {a, b, c} s does not equal of s s = {a, f} s = {a, b, c, d}
func (Int) Has ¶
Has judges the specified element whether exists in the Int. it returns true if existed, and false if not.
func (Int) HasAll ¶
HasAll looks for the specified elements to judge whether all exist in the Int. it returns true if existed, and false if not.
func (Int) HasAny ¶
HasAny looks for the specified elements to judge whether at least one of the element exists in the Int. it returns true if existed, and false if not.
func (Int) Intersection ¶
Intersection returns the intersection of Int s and t. For example: s = {a, b, c} s = {a, c, d, e, f} s.Intersection(s) = {a, c} s.Intersection(s) = {a, c} s.Intersection(s) = s.Intersection(s)
func (Int) IsSubset ¶
IsSubset predicates that tests whether the Int s is a subset of Int t. For example: s is subset of s s = {a, b, c} s = {a, b, c, d} s is not subset of s s = {a, f} s = {a, b, c, d}
func (Int) IsSuperset ¶
IsSuperset predicates that tests whether the Int s is a super of Int t. For example: s is super of s s = {a, b, c, d} s = {a, b, c} s is not super of s s = {a, f} s = {a, b, c, d}
func (Int) Pop ¶
Pop returns an arbitrary element of Int, deleting it from Int. The second value is a bool that is true if the elements existed in the Int, and false if not.
func (Int) SortedList ¶
SortedList returns the all elements as a slice sorted by less func.
func (Int) SymmetricDifference ¶
SymmetricDifference returns a new Int with the elements that are either in this Int or in the given Int, but not in both. For example: s = {a, c} s = {a, b, d} s.SymmetricDifference(s) = {c, b, d} s.SymmetricDifference(s) = {c, b, d} s.SymmetricDifference(s) = s.SymmetricDifference(s)
type Int16 ¶ added in v0.0.2
type Int16 map[int16]struct{}
Int16 is a int16 collection that contains no duplicate elements, without any particular order. It supports typical set operations: Core set-theoretical operations, Static sets, Dynamic sets, Additional operations.
func NewInt16WithSize ¶ added in v0.0.2
NewInt16WithSize initializes a new Int16 with the specified size.
func (*Int16) Clear ¶ added in v0.0.2
func (s *Int16) Clear()
Clear removes all items from the Int16.
func (Int16) Difference ¶ added in v0.0.2
Difference returns the difference of Int16 s and t. For example: s = {a, b, c} s = {a, c, d, e, f} s.Difference(s) = {b} s.Difference(s) = {d, e, f}
func (Int16) Each ¶ added in v0.0.2
Each traverses the elements in the Int16, calling do func for each Int16 member.
func (Int16) EachE ¶ added in v0.0.2
EachE traverses the elements in the Int16, calling do func for each Int16 member. the cycle will be stopped when the do func returns error. if err is ErrBreakEach, break the cycle and return nil, else, break the cycle and return error.
func (Int16) Equal ¶ added in v0.0.2
Equal predicates that tests whether the Int16 s equals of Int16 t. For example: s equals of s s = {a, b, c} s = {a, b, c} s does not equal of s s = {a, f} s = {a, b, c, d}
func (Int16) Has ¶ added in v0.0.2
Has judges the specified element whether exists in the Int16. it returns true if existed, and false if not.
func (Int16) HasAll ¶ added in v0.0.2
HasAll looks for the specified elements to judge whether all exist in the Int16. it returns true if existed, and false if not.
func (Int16) HasAny ¶ added in v0.0.2
HasAny looks for the specified elements to judge whether at least one of the element exists in the Int16. it returns true if existed, and false if not.
func (Int16) Intersection ¶ added in v0.0.2
Intersection returns the intersection of Int16 s and t. For example: s = {a, b, c} s = {a, c, d, e, f} s.Intersection(s) = {a, c} s.Intersection(s) = {a, c} s.Intersection(s) = s.Intersection(s)
func (Int16) IsSubset ¶ added in v0.0.2
IsSubset predicates that tests whether the Int16 s is a subset of Int16 t. For example: s is subset of s s = {a, b, c} s = {a, b, c, d} s is not subset of s s = {a, f} s = {a, b, c, d}
func (Int16) IsSuperset ¶ added in v0.0.2
IsSuperset predicates that tests whether the Int16 s is a super of Int16 t. For example: s is super of s s = {a, b, c, d} s = {a, b, c} s is not super of s s = {a, f} s = {a, b, c, d}
func (Int16) Pop ¶ added in v0.0.2
Pop returns an arbitrary element of Int16, deleting it from Int16. The second value is a bool that is true if the elements existed in the Int16, and false if not.
func (Int16) SortedList ¶ added in v0.0.2
SortedList returns the all elements as a slice sorted by less func.
func (Int16) SymmetricDifference ¶ added in v0.0.2
SymmetricDifference returns a new Int16 with the elements that are either in this Int16 or in the given Int16, but not in both. For example: s = {a, c} s = {a, b, d} s.SymmetricDifference(s) = {c, b, d} s.SymmetricDifference(s) = {c, b, d} s.SymmetricDifference(s) = s.SymmetricDifference(s)
type Int32 ¶ added in v0.0.2
type Int32 map[int32]struct{}
Int32 is a int32 collection that contains no duplicate elements, without any particular order. It supports typical set operations: Core set-theoretical operations, Static sets, Dynamic sets, Additional operations.
func NewInt32WithSize ¶ added in v0.0.2
NewInt32WithSize initializes a new Int32 with the specified size.
func (*Int32) Clear ¶ added in v0.0.2
func (s *Int32) Clear()
Clear removes all items from the Int32.
func (Int32) Difference ¶ added in v0.0.2
Difference returns the difference of Int32 s and t. For example: s = {a, b, c} s = {a, c, d, e, f} s.Difference(s) = {b} s.Difference(s) = {d, e, f}
func (Int32) Each ¶ added in v0.0.2
Each traverses the elements in the Int32, calling do func for each Int32 member.
func (Int32) EachE ¶ added in v0.0.2
EachE traverses the elements in the Int32, calling do func for each Int32 member. the cycle will be stopped when the do func returns error. if err is ErrBreakEach, break the cycle and return nil, else, break the cycle and return error.
func (Int32) Equal ¶ added in v0.0.2
Equal predicates that tests whether the Int32 s equals of Int32 t. For example: s equals of s s = {a, b, c} s = {a, b, c} s does not equal of s s = {a, f} s = {a, b, c, d}
func (Int32) Has ¶ added in v0.0.2
Has judges the specified element whether exists in the Int32. it returns true if existed, and false if not.
func (Int32) HasAll ¶ added in v0.0.2
HasAll looks for the specified elements to judge whether all exist in the Int32. it returns true if existed, and false if not.
func (Int32) HasAny ¶ added in v0.0.2
HasAny looks for the specified elements to judge whether at least one of the element exists in the Int32. it returns true if existed, and false if not.
func (Int32) Intersection ¶ added in v0.0.2
Intersection returns the intersection of Int32 s and t. For example: s = {a, b, c} s = {a, c, d, e, f} s.Intersection(s) = {a, c} s.Intersection(s) = {a, c} s.Intersection(s) = s.Intersection(s)
func (Int32) IsSubset ¶ added in v0.0.2
IsSubset predicates that tests whether the Int32 s is a subset of Int32 t. For example: s is subset of s s = {a, b, c} s = {a, b, c, d} s is not subset of s s = {a, f} s = {a, b, c, d}
func (Int32) IsSuperset ¶ added in v0.0.2
IsSuperset predicates that tests whether the Int32 s is a super of Int32 t. For example: s is super of s s = {a, b, c, d} s = {a, b, c} s is not super of s s = {a, f} s = {a, b, c, d}
func (Int32) Pop ¶ added in v0.0.2
Pop returns an arbitrary element of Int32, deleting it from Int32. The second value is a bool that is true if the elements existed in the Int32, and false if not.
func (Int32) SortedList ¶ added in v0.0.2
SortedList returns the all elements as a slice sorted by less func.
func (Int32) SymmetricDifference ¶ added in v0.0.2
SymmetricDifference returns a new Int32 with the elements that are either in this Int32 or in the given Int32, but not in both. For example: s = {a, c} s = {a, b, d} s.SymmetricDifference(s) = {c, b, d} s.SymmetricDifference(s) = {c, b, d} s.SymmetricDifference(s) = s.SymmetricDifference(s)
type Int64 ¶
type Int64 map[int64]struct{}
Int64 is a int64 collection that contains no duplicate elements, without any particular order. It supports typical set operations: Core set-theoretical operations, Static sets, Dynamic sets, Additional operations.
func NewInt64WithSize ¶
NewInt64WithSize initializes a new Int64 with the specified size.
func (Int64) Difference ¶
Difference returns the difference of Int64 s and t. For example: s = {a, b, c} s = {a, c, d, e, f} s.Difference(s) = {b} s.Difference(s) = {d, e, f}
func (Int64) Each ¶
Each traverses the elements in the Int64, calling do func for each Int64 member.
func (Int64) EachE ¶
EachE traverses the elements in the Int64, calling do func for each Int64 member. the cycle will be stopped when the do func returns error. if err is ErrBreakEach, break the cycle and return nil, else, break the cycle and return error.
func (Int64) Equal ¶
Equal predicates that tests whether the Int64 s equals of Int64 t. For example: s equals of s s = {a, b, c} s = {a, b, c} s does not equal of s s = {a, f} s = {a, b, c, d}
func (Int64) Has ¶
Has judges the specified element whether exists in the Int64. it returns true if existed, and false if not.
func (Int64) HasAll ¶
HasAll looks for the specified elements to judge whether all exist in the Int64. it returns true if existed, and false if not.
func (Int64) HasAny ¶
HasAny looks for the specified elements to judge whether at least one of the element exists in the Int64. it returns true if existed, and false if not.
func (Int64) Intersection ¶
Intersection returns the intersection of Int64 s and t. For example: s = {a, b, c} s = {a, c, d, e, f} s.Intersection(s) = {a, c} s.Intersection(s) = {a, c} s.Intersection(s) = s.Intersection(s)
func (Int64) IsSubset ¶
IsSubset predicates that tests whether the Int64 s is a subset of Int64 t. For example: s is subset of s s = {a, b, c} s = {a, b, c, d} s is not subset of s s = {a, f} s = {a, b, c, d}
func (Int64) IsSuperset ¶
IsSuperset predicates that tests whether the Int64 s is a super of Int64 t. For example: s is super of s s = {a, b, c, d} s = {a, b, c} s is not super of s s = {a, f} s = {a, b, c, d}
func (Int64) Pop ¶
Pop returns an arbitrary element of Int64, deleting it from Int64. The second value is a bool that is true if the elements existed in the Int64, and false if not.
func (Int64) SortedList ¶
SortedList returns the all elements as a slice sorted by less func.
func (Int64) SymmetricDifference ¶
SymmetricDifference returns a new Int64 with the elements that are either in this Int64 or in the given Int64, but not in both. For example: s = {a, c} s = {a, b, d} s.SymmetricDifference(s) = {c, b, d} s.SymmetricDifference(s) = {c, b, d} s.SymmetricDifference(s) = s.SymmetricDifference(s)
type Int8 ¶ added in v0.0.2
type Int8 map[int8]struct{}
Int8 is a int8 collection that contains no duplicate elements, without any particular order. It supports typical set operations: Core set-theoretical operations, Static sets, Dynamic sets, Additional operations.
func NewInt8WithSize ¶ added in v0.0.2
NewInt8WithSize initializes a new Int8 with the specified size.
func (Int8) Difference ¶ added in v0.0.2
Difference returns the difference of Int8 s and t. For example: s = {a, b, c} s = {a, c, d, e, f} s.Difference(s) = {b} s.Difference(s) = {d, e, f}
func (Int8) Each ¶ added in v0.0.2
Each traverses the elements in the Int8, calling do func for each Int8 member.
func (Int8) EachE ¶ added in v0.0.2
EachE traverses the elements in the Int8, calling do func for each Int8 member. the cycle will be stopped when the do func returns error. if err is ErrBreakEach, break the cycle and return nil, else, break the cycle and return error.
func (Int8) Equal ¶ added in v0.0.2
Equal predicates that tests whether the Int8 s equals of Int8 t. For example: s equals of s s = {a, b, c} s = {a, b, c} s does not equal of s s = {a, f} s = {a, b, c, d}
func (Int8) Has ¶ added in v0.0.2
Has judges the specified element whether exists in the Int8. it returns true if existed, and false if not.
func (Int8) HasAll ¶ added in v0.0.2
HasAll looks for the specified elements to judge whether all exist in the Int8. it returns true if existed, and false if not.
func (Int8) HasAny ¶ added in v0.0.2
HasAny looks for the specified elements to judge whether at least one of the element exists in the Int8. it returns true if existed, and false if not.
func (Int8) Intersection ¶ added in v0.0.2
Intersection returns the intersection of Int8 s and t. For example: s = {a, b, c} s = {a, c, d, e, f} s.Intersection(s) = {a, c} s.Intersection(s) = {a, c} s.Intersection(s) = s.Intersection(s)
func (Int8) IsSubset ¶ added in v0.0.2
IsSubset predicates that tests whether the Int8 s is a subset of Int8 t. For example: s is subset of s s = {a, b, c} s = {a, b, c, d} s is not subset of s s = {a, f} s = {a, b, c, d}
func (Int8) IsSuperset ¶ added in v0.0.2
IsSuperset predicates that tests whether the Int8 s is a super of Int8 t. For example: s is super of s s = {a, b, c, d} s = {a, b, c} s is not super of s s = {a, f} s = {a, b, c, d}
func (Int8) Pop ¶ added in v0.0.2
Pop returns an arbitrary element of Int8, deleting it from Int8. The second value is a bool that is true if the elements existed in the Int8, and false if not.
func (Int8) SortedList ¶ added in v0.0.2
SortedList returns the all elements as a slice sorted by less func.
func (Int8) SymmetricDifference ¶ added in v0.0.2
SymmetricDifference returns a new Int8 with the elements that are either in this Int8 or in the given Int8, but not in both. For example: s = {a, c} s = {a, b, d} s.SymmetricDifference(s) = {c, b, d} s.SymmetricDifference(s) = {c, b, d} s.SymmetricDifference(s) = s.SymmetricDifference(s)
type Interface ¶
type Interface map[interface{}]struct{}
Interface is a interface{} collection that contains no duplicate elements, without any particular order. It supports typical set operations: Core set-theoretical operations, Static sets, Dynamic sets, Additional operations.
func NewInterface ¶
func NewInterface(elements ...interface{}) Interface
NewInterface initializes a new Interface.
func NewInterfaceWithSize ¶
NewInterfaceWithSize initializes a new Interface with the specified size.
func (Interface) Add ¶
func (s Interface) Add(elements ...interface{})
Add adds the elements to Interface, if it is not present already.
func (Interface) Difference ¶
Difference returns the difference of Interface s and t. For example: s = {a, b, c} s = {a, c, d, e, f} s.Difference(s) = {b} s.Difference(s) = {d, e, f}
func (Interface) Each ¶
func (s Interface) Each(do func(i interface{}))
Each traverses the elements in the Interface, calling do func for each Interface member.
func (Interface) EachE ¶
EachE traverses the elements in the Interface, calling do func for each Interface member. the cycle will be stopped when the do func returns error. if err is ErrBreakEach, break the cycle and return nil, else, break the cycle and return error.
func (Interface) Equal ¶
Equal predicates that tests whether the Interface s equals of Interface t. For example: s equals of s s = {a, b, c} s = {a, b, c} s does not equal of s s = {a, f} s = {a, b, c, d}
func (Interface) Has ¶
Has judges the specified element whether exists in the Interface. it returns true if existed, and false if not.
func (Interface) HasAll ¶
HasAll looks for the specified elements to judge whether all exist in the Interface. it returns true if existed, and false if not.
func (Interface) HasAny ¶
HasAny looks for the specified elements to judge whether at least one of the element exists in the Interface. it returns true if existed, and false if not.
func (Interface) Intersection ¶
Intersection returns the intersection of Interface s and t. For example: s = {a, b, c} s = {a, c, d, e, f} s.Intersection(s) = {a, c} s.Intersection(s) = {a, c} s.Intersection(s) = s.Intersection(s)
func (Interface) IsSubset ¶
IsSubset predicates that tests whether the Interface s is a subset of Interface t. For example: s is subset of s s = {a, b, c} s = {a, b, c, d} s is not subset of s s = {a, f} s = {a, b, c, d}
func (Interface) IsSuperset ¶
IsSuperset predicates that tests whether the Interface s is a super of Interface t. For example: s is super of s s = {a, b, c, d} s = {a, b, c} s is not super of s s = {a, f} s = {a, b, c, d}
func (Interface) List ¶
func (s Interface) List() []interface{}
List returns the all elements as a slice.
func (Interface) Pop ¶
Pop returns an arbitrary element of Interface, deleting it from Interface. The second value is a bool that is true if the elements existed in the Interface, and false if not.
func (Interface) Remove ¶
func (s Interface) Remove(elements ...interface{})
Remove removes the element from Interface, if it is present.
func (Interface) SortedList ¶
SortedList returns the all elements as a slice sorted by less func.
func (Interface) SymmetricDifference ¶
SymmetricDifference returns a new Interface with the elements that are either in this Interface or in the given Interface, but not in both. For example: s = {a, c} s = {a, b, d} s.SymmetricDifference(s) = {c, b, d} s.SymmetricDifference(s) = {c, b, d} s.SymmetricDifference(s) = s.SymmetricDifference(s)
type String ¶
type String map[string]struct{}
String is a string collection that contains no duplicate elements, without any particular order. It supports typical set operations: Core set-theoretical operations, Static sets, Dynamic sets, Additional operations.
func NewStringWithSize ¶
NewStringWithSize initializes a new String with the specified size.
func (String) Difference ¶
Difference returns the difference of String s and t. For example: s = {a, b, c} s = {a, c, d, e, f} s.Difference(s) = {b} s.Difference(s) = {d, e, f}
func (String) Each ¶
Each traverses the elements in the String, calling do func for each String member.
func (String) EachE ¶
EachE traverses the elements in the String, calling do func for each String member. the cycle will be stopped when the do func returns error. if err is ErrBreakEach, break the cycle and return nil, else, break the cycle and return error.
func (String) Equal ¶
Equal predicates that tests whether the String s equals of String t. For example: s equals of s s = {a, b, c} s = {a, b, c} s does not equal of s s = {a, f} s = {a, b, c, d}
func (String) Has ¶
Has judges the specified element whether exists in the String. it returns true if existed, and false if not.
func (String) HasAll ¶
HasAll looks for the specified elements to judge whether all exist in the String. it returns true if existed, and false if not.
func (String) HasAny ¶
HasAny looks for the specified elements to judge whether at least one of the element exists in the String. it returns true if existed, and false if not.
func (String) Intersection ¶
Intersection returns the intersection of String s and t. For example: s = {a, b, c} s = {a, c, d, e, f} s.Intersection(s) = {a, c} s.Intersection(s) = {a, c} s.Intersection(s) = s.Intersection(s)
func (String) IsSubset ¶
IsSubset predicates that tests whether the String s is a subset of String t. For example: s is subset of s s = {a, b, c} s = {a, b, c, d} s is not subset of s s = {a, f} s = {a, b, c, d}
func (String) IsSuperset ¶
IsSuperset predicates that tests whether the String s is a super of String t. For example: s is super of s s = {a, b, c, d} s = {a, b, c} s is not super of s s = {a, f} s = {a, b, c, d}
func (String) Pop ¶
Pop returns an arbitrary element of String, deleting it from String. The second value is a bool that is true if the elements existed in the String, and false if not.
func (String) SortedList ¶
SortedList returns the all elements as a slice sorted by less func.
func (String) SymmetricDifference ¶
SymmetricDifference returns a new String with the elements that are either in this String or in the given String, but not in both. For example: s = {a, c} s = {a, b, d} s.SymmetricDifference(s) = {c, b, d} s.SymmetricDifference(s) = {c, b, d} s.SymmetricDifference(s) = s.SymmetricDifference(s)
type Uint ¶ added in v0.0.2
type Uint map[uint]struct{}
Uint is a uint collection that contains no duplicate elements, without any particular order. It supports typical set operations: Core set-theoretical operations, Static sets, Dynamic sets, Additional operations.
func NewUintWithSize ¶ added in v0.0.2
NewUintWithSize initializes a new Uint with the specified size.
func (Uint) Difference ¶ added in v0.0.2
Difference returns the difference of Uint s and t. For example: s = {a, b, c} s = {a, c, d, e, f} s.Difference(s) = {b} s.Difference(s) = {d, e, f}
func (Uint) Each ¶ added in v0.0.2
Each traverses the elements in the Uint, calling do func for each Uint member.
func (Uint) EachE ¶ added in v0.0.2
EachE traverses the elements in the Uint, calling do func for each Uint member. the cycle will be stopped when the do func returns error. if err is ErrBreakEach, break the cycle and return nil, else, break the cycle and return error.
func (Uint) Equal ¶ added in v0.0.2
Equal predicates that tests whether the Uint s equals of Uint t. For example: s equals of s s = {a, b, c} s = {a, b, c} s does not equal of s s = {a, f} s = {a, b, c, d}
func (Uint) Has ¶ added in v0.0.2
Has judges the specified element whether exists in the Uint. it returns true if existed, and false if not.
func (Uint) HasAll ¶ added in v0.0.2
HasAll looks for the specified elements to judge whether all exist in the Uint. it returns true if existed, and false if not.
func (Uint) HasAny ¶ added in v0.0.2
HasAny looks for the specified elements to judge whether at least one of the element exists in the Uint. it returns true if existed, and false if not.
func (Uint) Intersection ¶ added in v0.0.2
Intersection returns the intersection of Uint s and t. For example: s = {a, b, c} s = {a, c, d, e, f} s.Intersection(s) = {a, c} s.Intersection(s) = {a, c} s.Intersection(s) = s.Intersection(s)
func (Uint) IsSubset ¶ added in v0.0.2
IsSubset predicates that tests whether the Uint s is a subset of Uint t. For example: s is subset of s s = {a, b, c} s = {a, b, c, d} s is not subset of s s = {a, f} s = {a, b, c, d}
func (Uint) IsSuperset ¶ added in v0.0.2
IsSuperset predicates that tests whether the Uint s is a super of Uint t. For example: s is super of s s = {a, b, c, d} s = {a, b, c} s is not super of s s = {a, f} s = {a, b, c, d}
func (Uint) Pop ¶ added in v0.0.2
Pop returns an arbitrary element of Uint, deleting it from Uint. The second value is a bool that is true if the elements existed in the Uint, and false if not.
func (Uint) SortedList ¶ added in v0.0.2
SortedList returns the all elements as a slice sorted by less func.
func (Uint) SymmetricDifference ¶ added in v0.0.2
SymmetricDifference returns a new Uint with the elements that are either in this Uint or in the given Uint, but not in both. For example: s = {a, c} s = {a, b, d} s.SymmetricDifference(s) = {c, b, d} s.SymmetricDifference(s) = {c, b, d} s.SymmetricDifference(s) = s.SymmetricDifference(s)
type Uint16 ¶ added in v0.0.2
type Uint16 map[uint16]struct{}
Uint16 is a uint16 collection that contains no duplicate elements, without any particular order. It supports typical set operations: Core set-theoretical operations, Static sets, Dynamic sets, Additional operations.
func NewUint16WithSize ¶ added in v0.0.2
NewUint16WithSize initializes a new Uint16 with the specified size.
func (*Uint16) Clear ¶ added in v0.0.2
func (s *Uint16) Clear()
Clear removes all items from the Uint16.
func (Uint16) Difference ¶ added in v0.0.2
Difference returns the difference of Uint16 s and t. For example: s = {a, b, c} s = {a, c, d, e, f} s.Difference(s) = {b} s.Difference(s) = {d, e, f}
func (Uint16) Each ¶ added in v0.0.2
Each traverses the elements in the Uint16, calling do func for each Uint16 member.
func (Uint16) EachE ¶ added in v0.0.2
EachE traverses the elements in the Uint16, calling do func for each Uint16 member. the cycle will be stopped when the do func returns error. if err is ErrBreakEach, break the cycle and return nil, else, break the cycle and return error.
func (Uint16) Equal ¶ added in v0.0.2
Equal predicates that tests whether the Uint16 s equals of Uint16 t. For example: s equals of s s = {a, b, c} s = {a, b, c} s does not equal of s s = {a, f} s = {a, b, c, d}
func (Uint16) Has ¶ added in v0.0.2
Has judges the specified element whether exists in the Uint16. it returns true if existed, and false if not.
func (Uint16) HasAll ¶ added in v0.0.2
HasAll looks for the specified elements to judge whether all exist in the Uint16. it returns true if existed, and false if not.
func (Uint16) HasAny ¶ added in v0.0.2
HasAny looks for the specified elements to judge whether at least one of the element exists in the Uint16. it returns true if existed, and false if not.
func (Uint16) Intersection ¶ added in v0.0.2
Intersection returns the intersection of Uint16 s and t. For example: s = {a, b, c} s = {a, c, d, e, f} s.Intersection(s) = {a, c} s.Intersection(s) = {a, c} s.Intersection(s) = s.Intersection(s)
func (Uint16) IsSubset ¶ added in v0.0.2
IsSubset predicates that tests whether the Uint16 s is a subset of Uint16 t. For example: s is subset of s s = {a, b, c} s = {a, b, c, d} s is not subset of s s = {a, f} s = {a, b, c, d}
func (Uint16) IsSuperset ¶ added in v0.0.2
IsSuperset predicates that tests whether the Uint16 s is a super of Uint16 t. For example: s is super of s s = {a, b, c, d} s = {a, b, c} s is not super of s s = {a, f} s = {a, b, c, d}
func (Uint16) Pop ¶ added in v0.0.2
Pop returns an arbitrary element of Uint16, deleting it from Uint16. The second value is a bool that is true if the elements existed in the Uint16, and false if not.
func (Uint16) SortedList ¶ added in v0.0.2
SortedList returns the all elements as a slice sorted by less func.
func (Uint16) SymmetricDifference ¶ added in v0.0.2
SymmetricDifference returns a new Uint16 with the elements that are either in this Uint16 or in the given Uint16, but not in both. For example: s = {a, c} s = {a, b, d} s.SymmetricDifference(s) = {c, b, d} s.SymmetricDifference(s) = {c, b, d} s.SymmetricDifference(s) = s.SymmetricDifference(s)
type Uint32 ¶ added in v0.0.2
type Uint32 map[uint32]struct{}
Uint32 is a uint32 collection that contains no duplicate elements, without any particular order. It supports typical set operations: Core set-theoretical operations, Static sets, Dynamic sets, Additional operations.
func NewUint32WithSize ¶ added in v0.0.2
NewUint32WithSize initializes a new Uint32 with the specified size.
func (*Uint32) Clear ¶ added in v0.0.2
func (s *Uint32) Clear()
Clear removes all items from the Uint32.
func (Uint32) Difference ¶ added in v0.0.2
Difference returns the difference of Uint32 s and t. For example: s = {a, b, c} s = {a, c, d, e, f} s.Difference(s) = {b} s.Difference(s) = {d, e, f}
func (Uint32) Each ¶ added in v0.0.2
Each traverses the elements in the Uint32, calling do func for each Uint32 member.
func (Uint32) EachE ¶ added in v0.0.2
EachE traverses the elements in the Uint32, calling do func for each Uint32 member. the cycle will be stopped when the do func returns error. if err is ErrBreakEach, break the cycle and return nil, else, break the cycle and return error.
func (Uint32) Equal ¶ added in v0.0.2
Equal predicates that tests whether the Uint32 s equals of Uint32 t. For example: s equals of s s = {a, b, c} s = {a, b, c} s does not equal of s s = {a, f} s = {a, b, c, d}
func (Uint32) Has ¶ added in v0.0.2
Has judges the specified element whether exists in the Uint32. it returns true if existed, and false if not.
func (Uint32) HasAll ¶ added in v0.0.2
HasAll looks for the specified elements to judge whether all exist in the Uint32. it returns true if existed, and false if not.
func (Uint32) HasAny ¶ added in v0.0.2
HasAny looks for the specified elements to judge whether at least one of the element exists in the Uint32. it returns true if existed, and false if not.
func (Uint32) Intersection ¶ added in v0.0.2
Intersection returns the intersection of Uint32 s and t. For example: s = {a, b, c} s = {a, c, d, e, f} s.Intersection(s) = {a, c} s.Intersection(s) = {a, c} s.Intersection(s) = s.Intersection(s)
func (Uint32) IsSubset ¶ added in v0.0.2
IsSubset predicates that tests whether the Uint32 s is a subset of Uint32 t. For example: s is subset of s s = {a, b, c} s = {a, b, c, d} s is not subset of s s = {a, f} s = {a, b, c, d}
func (Uint32) IsSuperset ¶ added in v0.0.2
IsSuperset predicates that tests whether the Uint32 s is a super of Uint32 t. For example: s is super of s s = {a, b, c, d} s = {a, b, c} s is not super of s s = {a, f} s = {a, b, c, d}
func (Uint32) Pop ¶ added in v0.0.2
Pop returns an arbitrary element of Uint32, deleting it from Uint32. The second value is a bool that is true if the elements existed in the Uint32, and false if not.
func (Uint32) SortedList ¶ added in v0.0.2
SortedList returns the all elements as a slice sorted by less func.
func (Uint32) SymmetricDifference ¶ added in v0.0.2
SymmetricDifference returns a new Uint32 with the elements that are either in this Uint32 or in the given Uint32, but not in both. For example: s = {a, c} s = {a, b, d} s.SymmetricDifference(s) = {c, b, d} s.SymmetricDifference(s) = {c, b, d} s.SymmetricDifference(s) = s.SymmetricDifference(s)
type Uint64 ¶ added in v0.0.2
type Uint64 map[uint64]struct{}
Uint64 is a uint64 collection that contains no duplicate elements, without any particular order. It supports typical set operations: Core set-theoretical operations, Static sets, Dynamic sets, Additional operations.
func NewUint64WithSize ¶ added in v0.0.2
NewUint64WithSize initializes a new Uint64 with the specified size.
func (*Uint64) Clear ¶ added in v0.0.2
func (s *Uint64) Clear()
Clear removes all items from the Uint64.
func (Uint64) Difference ¶ added in v0.0.2
Difference returns the difference of Uint64 s and t. For example: s = {a, b, c} s = {a, c, d, e, f} s.Difference(s) = {b} s.Difference(s) = {d, e, f}
func (Uint64) Each ¶ added in v0.0.2
Each traverses the elements in the Uint64, calling do func for each Uint64 member.
func (Uint64) EachE ¶ added in v0.0.2
EachE traverses the elements in the Uint64, calling do func for each Uint64 member. the cycle will be stopped when the do func returns error. if err is ErrBreakEach, break the cycle and return nil, else, break the cycle and return error.
func (Uint64) Equal ¶ added in v0.0.2
Equal predicates that tests whether the Uint64 s equals of Uint64 t. For example: s equals of s s = {a, b, c} s = {a, b, c} s does not equal of s s = {a, f} s = {a, b, c, d}
func (Uint64) Has ¶ added in v0.0.2
Has judges the specified element whether exists in the Uint64. it returns true if existed, and false if not.
func (Uint64) HasAll ¶ added in v0.0.2
HasAll looks for the specified elements to judge whether all exist in the Uint64. it returns true if existed, and false if not.
func (Uint64) HasAny ¶ added in v0.0.2
HasAny looks for the specified elements to judge whether at least one of the element exists in the Uint64. it returns true if existed, and false if not.
func (Uint64) Intersection ¶ added in v0.0.2
Intersection returns the intersection of Uint64 s and t. For example: s = {a, b, c} s = {a, c, d, e, f} s.Intersection(s) = {a, c} s.Intersection(s) = {a, c} s.Intersection(s) = s.Intersection(s)
func (Uint64) IsSubset ¶ added in v0.0.2
IsSubset predicates that tests whether the Uint64 s is a subset of Uint64 t. For example: s is subset of s s = {a, b, c} s = {a, b, c, d} s is not subset of s s = {a, f} s = {a, b, c, d}
func (Uint64) IsSuperset ¶ added in v0.0.2
IsSuperset predicates that tests whether the Uint64 s is a super of Uint64 t. For example: s is super of s s = {a, b, c, d} s = {a, b, c} s is not super of s s = {a, f} s = {a, b, c, d}
func (Uint64) Pop ¶ added in v0.0.2
Pop returns an arbitrary element of Uint64, deleting it from Uint64. The second value is a bool that is true if the elements existed in the Uint64, and false if not.
func (Uint64) SortedList ¶ added in v0.0.2
SortedList returns the all elements as a slice sorted by less func.
func (Uint64) SymmetricDifference ¶ added in v0.0.2
SymmetricDifference returns a new Uint64 with the elements that are either in this Uint64 or in the given Uint64, but not in both. For example: s = {a, c} s = {a, b, d} s.SymmetricDifference(s) = {c, b, d} s.SymmetricDifference(s) = {c, b, d} s.SymmetricDifference(s) = s.SymmetricDifference(s)
type Uint8 ¶ added in v0.0.2
type Uint8 map[uint8]struct{}
Uint8 is a uint8 collection that contains no duplicate elements, without any particular order. It supports typical set operations: Core set-theoretical operations, Static sets, Dynamic sets, Additional operations.
func NewUint8WithSize ¶ added in v0.0.2
NewUint8WithSize initializes a new Uint8 with the specified size.
func (*Uint8) Clear ¶ added in v0.0.2
func (s *Uint8) Clear()
Clear removes all items from the Uint8.
func (Uint8) Difference ¶ added in v0.0.2
Difference returns the difference of Uint8 s and t. For example: s = {a, b, c} s = {a, c, d, e, f} s.Difference(s) = {b} s.Difference(s) = {d, e, f}
func (Uint8) Each ¶ added in v0.0.2
Each traverses the elements in the Uint8, calling do func for each Uint8 member.
func (Uint8) EachE ¶ added in v0.0.2
EachE traverses the elements in the Uint8, calling do func for each Uint8 member. the cycle will be stopped when the do func returns error. if err is ErrBreakEach, break the cycle and return nil, else, break the cycle and return error.
func (Uint8) Equal ¶ added in v0.0.2
Equal predicates that tests whether the Uint8 s equals of Uint8 t. For example: s equals of s s = {a, b, c} s = {a, b, c} s does not equal of s s = {a, f} s = {a, b, c, d}
func (Uint8) Has ¶ added in v0.0.2
Has judges the specified element whether exists in the Uint8. it returns true if existed, and false if not.
func (Uint8) HasAll ¶ added in v0.0.2
HasAll looks for the specified elements to judge whether all exist in the Uint8. it returns true if existed, and false if not.
func (Uint8) HasAny ¶ added in v0.0.2
HasAny looks for the specified elements to judge whether at least one of the element exists in the Uint8. it returns true if existed, and false if not.
func (Uint8) Intersection ¶ added in v0.0.2
Intersection returns the intersection of Uint8 s and t. For example: s = {a, b, c} s = {a, c, d, e, f} s.Intersection(s) = {a, c} s.Intersection(s) = {a, c} s.Intersection(s) = s.Intersection(s)
func (Uint8) IsSubset ¶ added in v0.0.2
IsSubset predicates that tests whether the Uint8 s is a subset of Uint8 t. For example: s is subset of s s = {a, b, c} s = {a, b, c, d} s is not subset of s s = {a, f} s = {a, b, c, d}
func (Uint8) IsSuperset ¶ added in v0.0.2
IsSuperset predicates that tests whether the Uint8 s is a super of Uint8 t. For example: s is super of s s = {a, b, c, d} s = {a, b, c} s is not super of s s = {a, f} s = {a, b, c, d}
func (Uint8) Pop ¶ added in v0.0.2
Pop returns an arbitrary element of Uint8, deleting it from Uint8. The second value is a bool that is true if the elements existed in the Uint8, and false if not.
func (Uint8) SortedList ¶ added in v0.0.2
SortedList returns the all elements as a slice sorted by less func.
func (Uint8) SymmetricDifference ¶ added in v0.0.2
SymmetricDifference returns a new Uint8 with the elements that are either in this Uint8 or in the given Uint8, but not in both. For example: s = {a, c} s = {a, b, d} s.SymmetricDifference(s) = {c, b, d} s.SymmetricDifference(s) = {c, b, d} s.SymmetricDifference(s) = s.SymmetricDifference(s)
type Uintptr ¶ added in v0.0.2
type Uintptr map[uintptr]struct{}
Uintptr is a uintptr collection that contains no duplicate elements, without any particular order. It supports typical set operations: Core set-theoretical operations, Static sets, Dynamic sets, Additional operations.
func NewUintptr ¶ added in v0.0.2
NewUintptr initializes a new Uintptr.
func NewUintptrWithSize ¶ added in v0.0.2
NewUintptrWithSize initializes a new Uintptr with the specified size.
func (Uintptr) Add ¶ added in v0.0.2
Add adds the elements to Uintptr, if it is not present already.
func (*Uintptr) Clear ¶ added in v0.0.2
func (s *Uintptr) Clear()
Clear removes all items from the Uintptr.
func (Uintptr) Difference ¶ added in v0.0.2
Difference returns the difference of Uintptr s and t. For example: s = {a, b, c} s = {a, c, d, e, f} s.Difference(s) = {b} s.Difference(s) = {d, e, f}
func (Uintptr) Each ¶ added in v0.0.2
Each traverses the elements in the Uintptr, calling do func for each Uintptr member.
func (Uintptr) EachE ¶ added in v0.0.2
EachE traverses the elements in the Uintptr, calling do func for each Uintptr member. the cycle will be stopped when the do func returns error. if err is ErrBreakEach, break the cycle and return nil, else, break the cycle and return error.
func (Uintptr) Equal ¶ added in v0.0.2
Equal predicates that tests whether the Uintptr s equals of Uintptr t. For example: s equals of s s = {a, b, c} s = {a, b, c} s does not equal of s s = {a, f} s = {a, b, c, d}
func (Uintptr) Has ¶ added in v0.0.2
Has judges the specified element whether exists in the Uintptr. it returns true if existed, and false if not.
func (Uintptr) HasAll ¶ added in v0.0.2
HasAll looks for the specified elements to judge whether all exist in the Uintptr. it returns true if existed, and false if not.
func (Uintptr) HasAny ¶ added in v0.0.2
HasAny looks for the specified elements to judge whether at least one of the element exists in the Uintptr. it returns true if existed, and false if not.
func (Uintptr) Intersection ¶ added in v0.0.2
Intersection returns the intersection of Uintptr s and t. For example: s = {a, b, c} s = {a, c, d, e, f} s.Intersection(s) = {a, c} s.Intersection(s) = {a, c} s.Intersection(s) = s.Intersection(s)
func (Uintptr) IsSubset ¶ added in v0.0.2
IsSubset predicates that tests whether the Uintptr s is a subset of Uintptr t. For example: s is subset of s s = {a, b, c} s = {a, b, c, d} s is not subset of s s = {a, f} s = {a, b, c, d}
func (Uintptr) IsSuperset ¶ added in v0.0.2
IsSuperset predicates that tests whether the Uintptr s is a super of Uintptr t. For example: s is super of s s = {a, b, c, d} s = {a, b, c} s is not super of s s = {a, f} s = {a, b, c, d}
func (Uintptr) Pop ¶ added in v0.0.2
Pop returns an arbitrary element of Uintptr, deleting it from Uintptr. The second value is a bool that is true if the elements existed in the Uintptr, and false if not.
func (Uintptr) SortedList ¶ added in v0.0.2
SortedList returns the all elements as a slice sorted by less func.
func (Uintptr) SymmetricDifference ¶ added in v0.0.2
SymmetricDifference returns a new Uintptr with the elements that are either in this Uintptr or in the given Uintptr, but not in both. For example: s = {a, c} s = {a, b, d} s.SymmetricDifference(s) = {c, b, d} s.SymmetricDifference(s) = {c, b, d} s.SymmetricDifference(s) = s.SymmetricDifference(s)