Documentation
¶
Overview ¶
set is a Go library that implements a Set data structure
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Emptier ¶
type Emptier interface {
// Removes all of the elements from a collection.
// The collection will be empty after this call returns
Empty()
}
Optional types
type HashSet ¶
type HashSet struct {
// contains filtered or unexported fields
}
func (*HashSet) IsElementOf ¶
Implements the Set.IsElementOf method
type Interface ¶
type Interface interface {
// Adds the specified element to the set and returns true if the operation was successful or false
// or false if the element already exists
Add(v interface{}) bool
// Removes the specified element from this set if it is present
Remove(v interface{}) bool
// Checks weather the element exists in the Set
IsElementOf(v interface{}) bool
// Get the size of the Set
Size() int
}
Package Set Interface
Click to show internal directories.
Click to hide internal directories.