Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHashSet ¶
NewHashSet instantiates a new empty set of unordered elements
func NewTreeSetWith ¶
func NewTreeSetWithTimeComparator ¶
NewTreeSetWithTimeComparator instantiates a new empty set of ordered elements that contain time.Time
Types ¶
type Comparator ¶
type Comparator func(a, b interface{}) int
Comparator will make type assertion (see IntComparator for example), which will panic if a or b are not of the asserted type.
Should return a number:
negative , if a < b zero , if a == b positive , if a > b
type Set ¶
type Set interface { Add(items ...interface{}) Remove(items ...interface{}) Values() []interface{} String() string Clear() Size() int Empty() bool Contains(items ...interface{}) bool }
Set is a data structure implementation of ordered or unordered collection of unique elements that should insert/delete in O(1) if unordered and insert/delete in O(logn) if ordered
Click to show internal directories.
Click to hide internal directories.