Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Set ¶
type Set interface {
// Clear clears the set
Clear()
// Empty checks if the set is empty
Empty() bool
// Count returns the size of the set
Count() int
// Insert adds a key to the set
Insert(key string)
// Contains checks if the key exists in the set
Contains(key string) bool
// Remove removes the key from the set
Remove(key string)
// Keys returns the set of keys
Keys() []string
// Equals compares the set against another set
Equals(s Set) bool
// Subset checks if this set is a subset of another
Subset(s Set) bool
// Superset checks if this set is a superset of another
Superset(s Set) bool
}
Set defines the interface for a set
func New ¶
New initializes a new set, picking the appropriate underlying implementation based on the specified expected capacity
func NewConcurrent ¶
NewConcurrent initializes a new concurrent set, picking the appropriate underlying implementation based on the specified expected capacity
func NewSortedSet ¶
NewSortedSet initializes a sorted-slice based set
Click to show internal directories.
Click to hide internal directories.