Versions in this module Expand all Collapse all v1 v1.0.4 Jul 20, 2023 v1.0.2 Jul 20, 2023 Changes in this version + func OrderedCompare(n1, n2 Ordered) int + type Comparable interface + Compare func(other Comparable) int + type ComparableKeyTreeMap struct + type Comparator func(o1, o2 V) int + type GoSlice []E + func (s GoSlice[E]) Append(es ...E) Slice[E] + func (s GoSlice[E]) Cap() int + func (s GoSlice[E]) Clear() Slice[E] + func (s GoSlice[E]) Cut(from, to int) Slice[E] + func (s GoSlice[E]) CutCap(from, to int, cap int) Slice[E] + func (s GoSlice[E]) CutCapTo(to int, cap int) Slice[E] + func (s GoSlice[E]) CutFrom(from int) Slice[E] + func (s GoSlice[E]) CutTo(to int) Slice[E] + func (s GoSlice[E]) Delete(i int) Slice[E] + func (s GoSlice[E]) DeleteIf(delete func(i int) bool) Slice[E] + func (s GoSlice[E]) Get(i int) E + func (s GoSlice[E]) Len() int + func (s GoSlice[E]) Pointer(i int) *E + func (s GoSlice[E]) Range(f func(i int) bool) + func (s GoSlice[E]) Set(i int, e E) + func (s GoSlice[E]) Swap(i, j int) + type LinkedList struct + func NewLinkedList() *LinkedList[E] + func (l *LinkedList[E]) AddEntryHead(entry *LinkedListEntry[E]) + func (l *LinkedList[E]) AddEntryTail(entry *LinkedListEntry[E]) + func (l *LinkedList[E]) AddHead(e E) (entry *LinkedListEntry[E]) + func (l *LinkedList[E]) AddTail(e E) (entry *LinkedListEntry[E]) + func (l *LinkedList[E]) Clear() + func (l *LinkedList[E]) Head() (e E, exist bool) + func (l *LinkedList[E]) HeadEntry() *LinkedListEntry[E] + func (l *LinkedList[E]) InsertBack(e E, ref *LinkedListEntry[E]) (entry *LinkedListEntry[E]) + func (l *LinkedList[E]) InsertEntryBack(entry, ref *LinkedListEntry[E]) + func (l *LinkedList[E]) InsertEntryFront(entry, ref *LinkedListEntry[E]) + func (l *LinkedList[E]) InsertFront(e E, ref *LinkedListEntry[E]) (entry *LinkedListEntry[E]) + func (l *LinkedList[E]) Len() int + func (l *LinkedList[E]) RemoveHead() (entry *LinkedListEntry[E]) + func (l *LinkedList[E]) RemoveTail() (entry *LinkedListEntry[E]) + func (l *LinkedList[E]) Tail() (e E, exist bool) + func (l *LinkedList[E]) TailEntry() *LinkedListEntry[E] + type LinkedListEntry struct + func NewLinkedListEntry(e E) *LinkedListEntry[E] + func (e *LinkedListEntry[E]) Next() *LinkedListEntry[E] + func (e *LinkedListEntry[E]) Prev() *LinkedListEntry[E] + func (e *LinkedListEntry[E]) Removed() bool + func (e *LinkedListEntry[E]) String() string + func (e *LinkedListEntry[E]) Value() E + type LinkedMap struct + func NewLinkedMap(size int) *LinkedMap[K, V] + func (m *LinkedMap[K, V]) Clear() + func (m *LinkedMap[K, V]) Empty() bool + func (m *LinkedMap[K, V]) First() (value V, exist bool) + func (m *LinkedMap[K, V]) FirstEntry() *LinkedMapEntry[K, V] + func (m *LinkedMap[K, V]) Get(key K) (value V, exist bool) + func (m *LinkedMap[K, V]) GetEntry(key K) *LinkedMapEntry[K, V] + func (m *LinkedMap[K, V]) Has(key K) bool + func (m *LinkedMap[K, V]) Last() (value V, exist bool) + func (m *LinkedMap[K, V]) LastEntry() *LinkedMapEntry[K, V] + func (m *LinkedMap[K, V]) Len() int + func (m *LinkedMap[K, V]) Put(key K, value V) (entry, old *LinkedMapEntry[K, V]) + func (m *LinkedMap[K, V]) PutEntry(e *LinkedMapEntry[K, V]) *LinkedMapEntry[K, V] + func (m *LinkedMap[K, V]) PutEntryIfAbsent(e *LinkedMapEntry[K, V]) (entry *LinkedMapEntry[K, V], exist bool) + func (m *LinkedMap[K, V]) PutIfAbsent(key K, value V) (entry *LinkedMapEntry[K, V], exist bool) + func (m *LinkedMap[K, V]) Range(f func(key K, value V) bool) bool + func (m *LinkedMap[K, V]) RangeEntry(f func(e *LinkedMapEntry[K, V]) bool) bool + func (m *LinkedMap[K, V]) Remove(key K) *LinkedMapEntry[K, V] + func (m *LinkedMap[K, V]) RemoveEntry(e *LinkedMapEntry[K, V]) bool + func (m *LinkedMap[K, V]) RemoveFirst() *LinkedMapEntry[K, V] + func (m *LinkedMap[K, V]) RemoveLast() *LinkedMapEntry[K, V] + func (m *LinkedMap[K, V]) Size() uint + type LinkedMapEntry struct + func NewLinkedMapEntry(key K, value V) *LinkedMapEntry[K, V] + func (e *LinkedMapEntry[K, V]) Key() K + func (e *LinkedMapEntry[K, V]) Next() *LinkedMapEntry[K, V] + func (e *LinkedMapEntry[K, V]) Prev() *LinkedMapEntry[K, V] + func (e *LinkedMapEntry[K, V]) Removed() bool + func (e *LinkedMapEntry[K, V]) SetValue(v V) + func (e *LinkedMapEntry[K, V]) String() string + func (e *LinkedMapEntry[K, V]) Value() V + type OrderedKeyTreeMap struct + type Queue struct + func NewQueue(cap int) *Queue[E] + func (q *Queue[E]) Cap() int + func (q *Queue[E]) Clear() + func (q *Queue[E]) Get(i int) E + func (q *Queue[E]) Head() (e E, exist bool) + func (q *Queue[E]) HeadPointer() *E + func (q *Queue[E]) Len() int + func (q *Queue[E]) Pointer(i int) *E + func (q *Queue[E]) Pop() (e E, ok bool) + func (q *Queue[E]) PopAll() []E + func (q *Queue[E]) PopTail() (e E, ok bool) + func (q *Queue[E]) PopTo(es []E) (n int) + func (q *Queue[E]) Push(e E) bool + func (q *Queue[E]) PushHead(e E) bool + func (q *Queue[E]) Set(i int, e E) + func (q *Queue[E]) Slice(start, end int) (prefix, suffix []E) + func (q *Queue[E]) Swap(i, j int) + func (q *Queue[E]) Tail() (e E, exist bool) + func (q *Queue[E]) TailPointer() *E + func (q *Queue[E]) Use() *E + func (q *Queue[E]) UseHead() *E + type Slice interface + Append func(es ...E) Slice[E] + Cap func() int + Clear func() Slice[E] + Cut func(from, to int) Slice[E] + CutCap func(from, to int, cap int) Slice[E] + CutCapTo func(to int, cap int) Slice[E] + CutFrom func(from int) Slice[E] + CutTo func(to int) Slice[E] + Delete func(i int) Slice[E] + DeleteIf func(delete func(i int) bool) Slice[E] + Get func(i int) E + Len func() int + Pointer func(i int) *E + Range func(f func(i int) bool) + Set func(i int, e E) + Swap func(i, j int) + type SyncMap struct + func (s *SyncMap[K, V]) Delete(key K) + func (s *SyncMap[K, V]) Keys() (keys []K) + func (s *SyncMap[K, V]) Load(key K) (value V, ok bool) + func (s *SyncMap[K, V]) LoadAndDelete(key K) (value V, loaded bool) + func (s *SyncMap[K, V]) LoadOrStore(key K, value V) (actual V, loaded bool) + func (s *SyncMap[K, V]) Map() map[K]V + func (s *SyncMap[K, V]) Range(f func(key K, value V) bool) + func (s *SyncMap[K, V]) Store(key K, value V) + func (s *SyncMap[K, V]) Values() (values []V) + type TreeMap struct + func NewComparableKeyTreeMap() *TreeMap[K, V] + func NewOrderedKeyTreeMap() *TreeMap[K, V] + func NewTreeMap(cpr Comparator[K]) *TreeMap[K, V] + func (m *TreeMap[K, V]) Clear() + func (m *TreeMap[K, V]) Empty() bool + func (m *TreeMap[K, V]) Get(key K) (value V, exist bool) + func (m *TreeMap[K, V]) GetEntry(key K) *TreeMapEntry[K, V] + func (m *TreeMap[K, V]) GetFirst() (value V, exist bool) + func (m *TreeMap[K, V]) GetFirstEntry() *TreeMapEntry[K, V] + func (m *TreeMap[K, V]) GetLast() (value V, exist bool) + func (m *TreeMap[K, V]) GetLastEntry() *TreeMapEntry[K, V] + func (m *TreeMap[K, V]) Has(key K) bool + func (m *TreeMap[K, V]) Put(key K, value V) (entry *TreeMapEntry[K, V], old *TreeMapEntry[K, V]) + func (m *TreeMap[K, V]) PutEntry(e *TreeMapEntry[K, V]) *TreeMapEntry[K, V] + func (m *TreeMap[K, V]) PutEntryIfAbsent(e *TreeMapEntry[K, V]) (entry *TreeMapEntry[K, V], exist bool) + func (m *TreeMap[K, V]) PutIfAbsent(key K, value V) (entry *TreeMapEntry[K, V], exist bool) + func (m *TreeMap[K, V]) Remove(key K) *TreeMapEntry[K, V] + func (m *TreeMap[K, V]) RemoveEntry(e *TreeMapEntry[K, V]) bool + func (m *TreeMap[K, V]) RemoveFirst() *TreeMapEntry[K, V] + func (m *TreeMap[K, V]) RemoveLast() *TreeMapEntry[K, V] + func (m *TreeMap[K, V]) Size() uint + type TreeMapEntry struct + func NewTreeMapEntry(key K, value V) *TreeMapEntry[K, V] + func (e *TreeMapEntry[K, V]) Key() K + func (e *TreeMapEntry[K, V]) Next() *TreeMapEntry[K, V] + func (e *TreeMapEntry[K, V]) Prev() *TreeMapEntry[K, V] + func (e *TreeMapEntry[K, V]) Removed() bool + func (e *TreeMapEntry[K, V]) SetValue(v V) + func (e *TreeMapEntry[K, V]) String() string + func (e *TreeMapEntry[K, V]) Value() V