Documentation ¶
Index ¶
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 NewWith ¶
func NewWith(comparator utils.Comparator) *Set
Instantiates a new empty set with the custom comparator.
func NewWithIntComparator ¶
func NewWithIntComparator() *Set
Instantiates a new empty set with the IntComparator, i.e. keys are of type int.
func NewWithStringComparator ¶
func NewWithStringComparator() *Set
Instantiates a new empty set with the StringComparator, i.e. keys are of type string.
func (*Set) Add ¶
func (set *Set) Add(items ...interface{})
Adds the items (one or more) to the set.
func (*Set) Contains ¶
Check wether items (one or more) are present in the set. All items have to be present in the set for the method to return true. Returns true if no arguments are passed at all, i.e. set is always superset of empty set.
Click to show internal directories.
Click to hide internal directories.