Versions in this module Expand all Collapse all v0 v0.1.0 Dec 4, 2020 Changes in this version + var ErrInvalidFuncSignature = errors.New("datastructure: invalid function signature") + var ErrStopIteration = errors.New("datastructure: stop iteration") + type Container interface + Clear func() + Empty func() bool + Size func() int + Values func() []interface{} + ValuesInto func(into interface{}) + type HashMap map[interface{}]interface + func (m *HashMap) Clear() + func (m *HashMap) ForEachInto(fn interface{}) error + func (m *HashMap) GetInto(key, into interface{}) bool + func (m *HashMap) Keys() []interface{} + func (m *HashMap) KeysInto(into interface{}) + func (m *HashMap) Values() []interface{} + func (m *HashMap) ValuesInto(into interface{}) + func (m HashMap) Contains(key interface{}) (found bool) + func (m HashMap) Empty() bool + func (m HashMap) ForEach(fn MapIterationFunc) error + func (m HashMap) Get(key interface{}) (value interface{}, found bool) + func (m HashMap) Put(key, value interface{}) (found bool) + func (m HashMap) Remove(key interface{}) (found bool) + func (m HashMap) Size() int + func NewHashMap() *HashMap + func NewHashMapWithCapacity(capacity int) *HashMap + type LinkedHashMap struct + func NewLinkedHashMap() *LinkedHashMap + func NewLinkedHashMapWithCapacity(capacity int) *LinkedHashMap + func (m *LinkedHashMap) Clear() + func (m *LinkedHashMap) Contains(key interface{}) (found bool) + func (m *LinkedHashMap) Empty() bool + func (m *LinkedHashMap) ForEach(fn MapIterationFunc) error + func (m *LinkedHashMap) ForEachInto(fn interface{}) error + func (m *LinkedHashMap) Get(key interface{}) (value interface{}, found bool) + func (m *LinkedHashMap) GetInto(key, into interface{}) bool + func (m *LinkedHashMap) Keys() []interface{} + func (m *LinkedHashMap) KeysInto(into interface{}) + func (m *LinkedHashMap) Put(key, value interface{}) (found bool) + func (m *LinkedHashMap) Remove(key interface{}) (found bool) + func (m *LinkedHashMap) Size() int + func (m *LinkedHashMap) Values() []interface{} + func (m *LinkedHashMap) ValuesInto(into interface{}) + type Map interface + Contains func(key interface{}) bool + ForEach func(fn MapIterationFunc) error + ForEachInto func(fn interface{}) error + Get func(key interface{}) (interface{}, bool) + GetInto func(key interface{}, into interface{}) bool + Keys func() []interface{} + KeysInto func(into interface{}) + Put func(key, value interface{}) bool + Remove func(key interface{}) bool + type MapBackedSet struct + func NewMapBackedSet(storage Map) *MapBackedSet + func (s *MapBackedSet) Add(elements ...interface{}) + func (s *MapBackedSet) AddAll(other Container) + func (s *MapBackedSet) Clear() + func (s *MapBackedSet) Contains(elements ...interface{}) bool + func (s *MapBackedSet) Empty() bool + func (s *MapBackedSet) ForEach(fn SetIterationFunc) error + func (s *MapBackedSet) ForEachInto(fn interface{}) error + func (s *MapBackedSet) Remove(elements ...interface{}) + func (s *MapBackedSet) RemoveAll(other Set) + func (s *MapBackedSet) RetainAll(other Set) + func (s *MapBackedSet) Size() int + func (s *MapBackedSet) Values() []interface{} + func (s *MapBackedSet) ValuesInto(into interface{}) + type MapIterationFunc func(key, value interface{}) error + type PriorityQueue struct + func NewPriorityQueue() *PriorityQueue + func (pq *PriorityQueue) Add(v interface{}, priority float64) + func (pq *PriorityQueue) Clear() + func (pq *PriorityQueue) Empty() bool + func (pq *PriorityQueue) Poll() (interface{}, bool) + func (pq *PriorityQueue) PollInto(into interface{}) bool + func (pq *PriorityQueue) Size() int + type Set interface + Add func(elements ...interface{}) + AddAll func(other Container) + Contains func(elements ...interface{}) bool + ForEach func(fn SetIterationFunc) error + ForEachInto func(fn interface{}) error + Remove func(elements ...interface{}) + RemoveAll func(other Set) + RetainAll func(other Set) + func NewHashSet() Set + func NewHashSetWithCapacity(capacity int) Set + func NewLinkedHashSet() Set + func NewLinkedHashSetWithCapacity(capacity int) Set + type SetIterationFunc func(element interface{}) error + type SynchronizedMap struct + func NewSynchronizedMap(storage Map) *SynchronizedMap + func (sm *SynchronizedMap) Clear() + func (sm *SynchronizedMap) CompareAndPut(key, value, expected interface{}) bool + func (sm *SynchronizedMap) CompareAndRemove(key, expected interface{}) bool + func (sm *SynchronizedMap) Contains(key interface{}) bool + func (sm *SynchronizedMap) Empty() bool + func (sm *SynchronizedMap) ForEach(fn MapIterationFunc) error + func (sm *SynchronizedMap) ForEachInto(fn interface{}) error + func (sm *SynchronizedMap) Get(key interface{}) (interface{}, bool) + func (sm *SynchronizedMap) GetInto(key interface{}, into interface{}) bool + func (sm *SynchronizedMap) Keys() []interface{} + func (sm *SynchronizedMap) KeysInto(into interface{}) + func (sm *SynchronizedMap) Put(key, value interface{}) bool + func (sm *SynchronizedMap) Remove(key interface{}) bool + func (sm *SynchronizedMap) Size() int + func (sm *SynchronizedMap) Values() []interface{} + func (sm *SynchronizedMap) ValuesInto(into interface{}) + type SynchronizedSet struct + func NewSynchronizedSet(storage Set) *SynchronizedSet + func (ss *SynchronizedSet) Add(elements ...interface{}) + func (ss *SynchronizedSet) AddAll(other Container) + func (ss *SynchronizedSet) Clear() + func (ss *SynchronizedSet) Contains(elements ...interface{}) bool + func (ss *SynchronizedSet) Empty() bool + func (ss *SynchronizedSet) ForEach(fn SetIterationFunc) error + func (ss *SynchronizedSet) ForEachInto(fn interface{}) error + func (ss *SynchronizedSet) Remove(elements ...interface{}) + func (ss *SynchronizedSet) RemoveAll(other Set) + func (ss *SynchronizedSet) RetainAll(other Set) + func (ss *SynchronizedSet) Size() int + func (ss *SynchronizedSet) Values() []interface{} + func (ss *SynchronizedSet) ValuesInto(into interface{})