import "github.com/khezen/struct/collection"
Exposes base collection interface and mixing operations(union, intersection, etc...)
type Interface interface {
Add(...interface{})
Remove(...interface{})
Replace(item, substitute interface{})
Has(...interface{}) bool
Each(func(item interface{}) bool)
Len() int
Clear()
IsEmpty() bool
IsEqual(Interface) bool
Merge(Interface)
Separate(Interface)
Retain(Interface)
String() string
Slice() []interface{}
CopyCollection() Interface
}
func Union(collections ...Interface) Interface
func Difference(collections ...Interface) Interface
func Intersection(collections ...Interface) Interface
func Exclusion(collections ...Interface) Interface
import "github.com/khezen/struct/array"
Abstraction layer over slices exposing utility functions and synchronized implementation of dynamic array.
import "github.com/khezen/struct/set"
Both synchronized and non-synchronized implementations of a generic set data structure.
import "github.com/khezen/struct/oset"
Both synchronized and non-synchronized implementations of a generic ordered set data structure.
import "github.com/khezen/struct/hashmap"
Both synchronized and non-synchronized implementations of a generic hashmap data structure.