Documentation ¶
Index ¶
- type Ints
- func (is Ints) Add(value int)
- func (is Ints) Contains(value int) bool
- func (is Ints) Difference(other Ints) Ints
- func (is Ints) Intersection(other Ints) Ints
- func (is Ints) IsEmpty() bool
- func (is Ints) Remove(value int)
- func (is Ints) Size() int
- func (is Ints) SortedValues() []int
- func (is Ints) Union(other Ints) Ints
- func (is Ints) Values() []int
- type Strings
- func (s Strings) Add(value string)
- func (s Strings) Contains(value string) bool
- func (s Strings) Difference(other Strings) Strings
- func (s Strings) Intersection(other Strings) Strings
- func (s Strings) IsEmpty() bool
- func (s Strings) Remove(value string)
- func (s Strings) Size() int
- func (s Strings) SortedValues() []string
- func (s Strings) Union(other Strings) Strings
- func (s Strings) Values() []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ints ¶
Ints represents the classic "set" data structure, and contains ints.
func NewInts ¶
NewInts creates and initializes an Ints and populates it with initial values as specified in the parameters.
func (Ints) Difference ¶
Difference returns a new Ints representing all the values in the target that are not in the parameter.
func (Ints) Intersection ¶
Intersection returns a new Ints representing a intersection of the elments in the method target and the parameter.
func (Ints) Remove ¶
Remove takes a value out of the set. If value wasn't in the set to start with, this method silently succeeds.
func (Ints) SortedValues ¶
SortedValues returns an ordered slice containing all the values in the set.
type Strings ¶
Strings represents the classic "set" data structure, and contains strings.
func NewStrings ¶
NewStrings creates and initializes a Strings and populates it with initial values as specified in the parameters.
func (Strings) Difference ¶
Difference returns a new Strings representing all the values in the target that are not in the parameter.
func (Strings) Intersection ¶
Intersection returns a new Strings representing a intersection of the elments in the method target and the parameter.
func (Strings) Remove ¶
Remove takes a value out of the set. If value wasn't in the set to start with, this method silently succeeds.
func (Strings) SortedValues ¶
SortedValues returns an ordered slice containing all the values in the set.