Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interface ¶
type Interface interface {
Add(item interface{}) Interface
Delete(item interface{}) Interface
Has(item interface{}) bool
Len() int
IsEmpty() bool
Each(fn func(item interface{}) Result.Interface) Result.Interface
ToArray() Array.Interface
Union(other Interface) Interface
Intersection(other Interface) Interface
Difference(other Interface) Interface
IsSubset(other Interface) bool
Equal(other Interface) bool
IsNull() bool
}
Interface is the public contract of a Set composite — an unordered collection of unique items, the go-composites sibling of Array (with which it shares the Each/ToArray grammar). Items are arbitrary comparable values (a Set is backed by a Go map, so each item must be comparable, exactly like a Dictionary key). Membership tests return a plain bool, fallible iteration returns a Result, and every method honours the Null-Object invariant (never nil).
Click to show internal directories.
Click to hide internal directories.