{"modulePath":"github.com/UnityTech/client-go","version":"v2.0.0+incompatible","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package sets\n\nPackage sets has auto-generated set types.\n\n## Types\n\n```go\ntype Byte map[byte]Empty\n```\nsets.Byte is a set of bytes, implemented via map\\[byte]struct{} for minimal memory consumption.\n\n```go\nfunc ByteKeySet(theMap interface{}) Byte\n```\nByteKeySet creates a Byte from a keys of a map\\[byte](? extends interface{}). If the value passed in is not actually a map, this will panic.\n\n```go\nfunc NewByte(items ...byte) Byte\n```\nNew creates a Byte from a list of values.\n\n```go\nfunc (s Byte) Delete(items ...byte)\n```\nDelete removes all items from the set.\n\n```go\nfunc (s Byte) Difference(s2 Byte) Byte\n```\nDifference returns a set of objects that are not in s2 For example: s1 = {a1, a2, a3} s2 = {a1, a2, a4, a5} s1.Difference(s2) = {a3} s2.Difference(s1) = {a4, a5}\n\n```go\nfunc (s1 Byte) Equal(s2 Byte) bool\n```\nEqual returns true if and only if s1 is equal (as a set) to s2. Two sets are equal if their membership is identical. (In practice, this means same elements, order doesn't matter)\n\n```go\nfunc (s Byte) Has(item byte) bool\n```\nHas returns true if and only if item is contained in the set.\n\n```go\nfunc (s Byte) HasAll(items ...byte) bool\n```\nHasAll returns true if and only if all items are contained in the set.\n\n```go\nfunc (s Byte) HasAny(items ...byte) bool\n```\nHasAny returns true if any items are contained in the set.\n\n```go\nfunc (s Byte) Insert(items ...byte)\n```\nInsert adds items to the set.\n\n```go\nfunc (s1 Byte) Intersection(s2 Byte) Byte\n```\nIntersection returns a new set which includes the item in BOTH s1 and s2 For example: s1 = {a1, a2} s2 = {a2, a3} s1.Intersection(s2) = {a2}\n\n```go\nfunc (s1 Byte) IsSuperset(s2 Byte) bool\n```\nIsSuperset returns true if and only if s1 is a superset of s2.\n\n```go\nfunc (s Byte) Len() int\n```\nLen returns the size of the set.\n\n```go\nfunc (s Byte) List() []byte\n```\nList returns the contents as a sorted byte slice.\n\n```go\nfunc (s Byte) PopAny() (byte, bool)\n```\nReturns a single element from the set.\n\n```go\nfunc (s1 Byte) Union(s2 Byte) Byte\n```\nUnion returns a new set which includes items in either s1 or s2. For example: s1 = {a1, a2} s2 = {a3, a4} s1.Union(s2) = {a1, a2, a3, a4} s2.Union(s1) = {a1, a2, a3, a4}\n\n```go\nfunc (s Byte) UnsortedList() []byte\n```\nUnsortedList returns the slice with contents in random order.\n\n```go\ntype Empty struct{}\n```\nEmpty is public since it is used by some internal API objects for conversions between external string arrays and internal sets, and conversion logic requires public types today.\n\n```go\ntype Int map[int]Empty\n```\nsets.Int is a set of ints, implemented via map\\[int]struct{} for minimal memory consumption.\n\n```go\nfunc IntKeySet(theMap interface{}) Int\n```\nIntKeySet creates a Int from a keys of a map\\[int](? extends interface{}). If the value passed in is not actually a map, this will panic.\n\n```go\nfunc NewInt(items ...int) Int\n```\nNew creates a Int from a list of values.\n\n```go\nfunc (s Int) Delete(items ...int)\n```\nDelete removes all items from the set.\n\n```go\nfunc (s Int) Difference(s2 Int) Int\n```\nDifference returns a set of objects that are not in s2 For example: s1 = {a1, a2, a3} s2 = {a1, a2, a4, a5} s1.Difference(s2) = {a3} s2.Difference(s1) = {a4, a5}\n\n```go\nfunc (s1 Int) Equal(s2 Int) bool\n```\nEqual returns true if and only if s1 is equal (as a set) to s2. Two sets are equal if their membership is identical. (In practice, this means same elements, order doesn't matter)\n\n```go\nfunc (s Int) Has(item int) bool\n```\nHas returns true if and only if item is contained in the set.\n\n```go\nfunc (s Int) HasAll(items ...int) bool\n```\nHasAll returns true if and only if all items are contained in the set.\n\n```go\nfunc (s Int) HasAny(items ...int) bool\n```\nHasAny returns true if any items are contained in the set.\n\n```go\nfunc (s Int) Insert(items ...int)\n```\nInsert adds items to the set.\n\n```go\nfunc (s1 Int) Intersection(s2 Int) Int\n```\nIntersection returns a new set which includes the item in BOTH s1 and s2 For example: s1 = {a1, a2} s2 = {a2, a3} s1.Intersection(s2) = {a2}\n\n```go\nfunc (s1 Int) IsSuperset(s2 Int) bool\n```\nIsSuperset returns true if and only if s1 is a superset of s2.\n\n```go\nfunc (s Int) Len() int\n```\nLen returns the size of the set.\n\n```go\nfunc (s Int) List() []int\n```\nList returns the contents as a sorted int slice.\n\n```go\nfunc (s Int) PopAny() (int, bool)\n```\nReturns a single element from the set.\n\n```go\nfunc (s1 Int) Union(s2 Int) Int\n```\nUnion returns a new set which includes items in either s1 or s2. For example: s1 = {a1, a2} s2 = {a3, a4} s1.Union(s2) = {a1, a2, a3, a4} s2.Union(s1) = {a1, a2, a3, a4}\n\n```go\nfunc (s Int) UnsortedList() []int\n```\nUnsortedList returns the slice with contents in random order.\n\n```go\ntype Int64 map[int64]Empty\n```\nsets.Int64 is a set of int64s, implemented via map\\[int64]struct{} for minimal memory consumption.\n\n```go\nfunc Int64KeySet(theMap interface{}) Int64\n```\nInt64KeySet creates a Int64 from a keys of a map\\[int64](? extends interface{}). If the value passed in is not actually a map, this will panic.\n\n```go\nfunc NewInt64(items ...int64) Int64\n```\nNew creates a Int64 from a list of values.\n\n```go\nfunc (s Int64) Delete(items ...int64)\n```\nDelete removes all items from the set.\n\n```go\nfunc (s Int64) Difference(s2 Int64) Int64\n```\nDifference returns a set of objects that are not in s2 For example: s1 = {a1, a2, a3} s2 = {a1, a2, a4, a5} s1.Difference(s2) = {a3} s2.Difference(s1) = {a4, a5}\n\n```go\nfunc (s1 Int64) Equal(s2 Int64) bool\n```\nEqual returns true if and only if s1 is equal (as a set) to s2. Two sets are equal if their membership is identical. (In practice, this means same elements, order doesn't matter)\n\n```go\nfunc (s Int64) Has(item int64) bool\n```\nHas returns true if and only if item is contained in the set.\n\n```go\nfunc (s Int64) HasAll(items ...int64) bool\n```\nHasAll returns true if and only if all items are contained in the set.\n\n```go\nfunc (s Int64) HasAny(items ...int64) bool\n```\nHasAny returns true if any items are contained in the set.\n\n```go\nfunc (s Int64) Insert(items ...int64)\n```\nInsert adds items to the set.\n\n```go\nfunc (s1 Int64) Intersection(s2 Int64) Int64\n```\nIntersection returns a new set which includes the item in BOTH s1 and s2 For example: s1 = {a1, a2} s2 = {a2, a3} s1.Intersection(s2) = {a2}\n\n```go\nfunc (s1 Int64) IsSuperset(s2 Int64) bool\n```\nIsSuperset returns true if and only if s1 is a superset of s2.\n\n```go\nfunc (s Int64) Len() int\n```\nLen returns the size of the set.\n\n```go\nfunc (s Int64) List() []int64\n```\nList returns the contents as a sorted int64 slice.\n\n```go\nfunc (s Int64) PopAny() (int64, bool)\n```\nReturns a single element from the set.\n\n```go\nfunc (s1 Int64) Union(s2 Int64) Int64\n```\nUnion returns a new set which includes items in either s1 or s2. For example: s1 = {a1, a2} s2 = {a3, a4} s1.Union(s2) = {a1, a2, a3, a4} s2.Union(s1) = {a1, a2, a3, a4}\n\n```go\nfunc (s Int64) UnsortedList() []int64\n```\nUnsortedList returns the slice with contents in random order.\n\n```go\ntype String map[string]Empty\n```\nsets.String is a set of strings, implemented via map\\[string]struct{} for minimal memory consumption.\n\n```go\nfunc NewString(items ...string) String\n```\nNew creates a String from a list of values.\n\n```go\nfunc StringKeySet(theMap interface{}) String\n```\nStringKeySet creates a String from a keys of a map\\[string](? extends interface{}). If the value passed in is not actually a map, this will panic.\n\n```go\nfunc (s String) Delete(items ...string)\n```\nDelete removes all items from the set.\n\n```go\nfunc (s String) Difference(s2 String) String\n```\nDifference returns a set of objects that are not in s2 For example: s1 = {a1, a2, a3} s2 = {a1, a2, a4, a5} s1.Difference(s2) = {a3} s2.Difference(s1) = {a4, a5}\n\n```go\nfunc (s1 String) Equal(s2 String) bool\n```\nEqual returns true if and only if s1 is equal (as a set) to s2. Two sets are equal if their membership is identical. (In practice, this means same elements, order doesn't matter)\n\n```go\nfunc (s String) Has(item string) bool\n```\nHas returns true if and only if item is contained in the set.\n\n```go\nfunc (s String) HasAll(items ...string) bool\n```\nHasAll returns true if and only if all items are contained in the set.\n\n```go\nfunc (s String) HasAny(items ...string) bool\n```\nHasAny returns true if any items are contained in the set.\n\n```go\nfunc (s String) Insert(items ...string)\n```\nInsert adds items to the set.\n\n```go\nfunc (s1 String) Intersection(s2 String) String\n```\nIntersection returns a new set which includes the item in BOTH s1 and s2 For example: s1 = {a1, a2} s2 = {a2, a3} s1.Intersection(s2) = {a2}\n\n```go\nfunc (s1 String) IsSuperset(s2 String) bool\n```\nIsSuperset returns true if and only if s1 is a superset of s2.\n\n```go\nfunc (s String) Len() int\n```\nLen returns the size of the set.\n\n```go\nfunc (s String) List() []string\n```\nList returns the contents as a sorted string slice.\n\n```go\nfunc (s String) PopAny() (string, bool)\n```\nReturns a single element from the set.\n\n```go\nfunc (s1 String) Union(s2 String) String\n```\nUnion returns a new set which includes items in either s1 or s2. For example: s1 = {a1, a2} s2 = {a3, a4} s1.Union(s2) = {a1, a2, a3, a4} s2.Union(s1) = {a1, a2, a3, a4}\n\n```go\nfunc (s String) UnsortedList() []string\n```\nUnsortedList returns the slice with contents in random order.\n\n","path":"github.com/UnityTech/client-go/pkg/util/sets","name":"sets","synopsis":"Package sets has auto-generated set types.","isRedistributable":true}
