Documentation ¶
Overview ¶
Package set provide many useful methods to deal with set Deprecated: please use new set (instead of current deprecated aset)
Index ¶
- type Set
- func (s *Set) All() []interface{}
- func (s *Set) Difference(set *Set) *Set
- func (s *Set) Do(f func(interface{}))
- func (s *Set) DoE(f func(interface{}) error) error
- func (s *Set) Has(element interface{}) bool
- func (s *Set) Insert(elements ...interface{})
- func (s *Set) Intersection(set *Set) *Set
- func (s *Set) Len() int
- func (s *Set) ProperSubsetOf(set *Set) bool
- func (s *Set) Remove(element interface{})
- func (s *Set) SubsetOf(set *Set) bool
- func (s *Set) ToStringList() ([]string, bool)
- func (s *Set) Union(set *Set) *Set
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Set ¶
type Set struct {
// contains filtered or unexported fields
}
func NewFromString ¶
func (*Set) Difference ¶
Difference Find the difference between two sets 返回的是自己存在而传入的 set 不存在的元素集合
func (*Set) Intersection ¶
Intersection Find the intersection of two sets
func (*Set) ProperSubsetOf ¶
ProperSubsetOf Test whether or not this set is a proper subset of "set"
func (*Set) ToStringList ¶
Click to show internal directories.
Click to hide internal directories.