Documentation
¶
Index ¶
- type Builder
- type GSet
- func (s GSet) Clone() GSet
- func (s GSet) Contains(net string) bool
- func (s GSet) Difference(s2 GSet) GSet
- func (s GSet) Equals(s2 GSet) bool
- func (s GSet) Filter(predicate func(string) bool) GSet
- func (s GSet) FilterNot(predicate func(string) bool) GSet
- func (s GSet) Intersection(s2 GSet) GSet
- func (s GSet) IsEmpty() bool
- func (s GSet) IsSubsetOf(s2 GSet) bool
- func (s GSet) Size() int
- func (s GSet) String() string
- func (s GSet) ToSlice() KVSlice
- func (s GSet) Union(s2 GSet) GSet
- type GValue
- type KV
- type KVSlice
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder is a mutable builder for GSet (Generic Set). Functions that mutate instances of this type are not thread-safe.
type GSet ¶
type GSet struct {
// contains filtered or unexported fields
}
GSet is a thread-safe, immutable set-like data structure for names (strings)
func (GSet) Difference ¶
Difference returns a new G set that contains all of the elements that are present in this set and not the supplied set, without mutating either source set.
func (GSet) Equals ¶
Equals returns true if the supplied set contains exactly the same elements as this set (s IsSubsetOf s2 and s2 IsSubsetOf s).
func (GSet) Filter ¶
Filter returns a new G set that contains all of the elements from this set that match the supplied predicate, without mutating the source set.
func (GSet) FilterNot ¶
FilterNot returns a new G set that contains all of the elements from this set that do not match the supplied predicate, without mutating the source set.
func (GSet) Intersection ¶
Intersection returns a new G set that contains all of the elements that are present in both this set and the supplied set, without mutating either source set.
func (GSet) IsSubsetOf ¶
IsSubsetOf returns true if the supplied set contains all the elements