Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type BidIterator ¶
type BidIterator[V any] interface { Iterator[V] Prev() BidIterator[V] }
BidIterator is an interface of const bidirectional iterator
type FakeLocker ¶
type FakeLocker struct{}
func (FakeLocker) Lock ¶
func (FakeLocker) Lock()
func (FakeLocker) RLock ¶
func (FakeLocker) RLock()
func (FakeLocker) RUnlock ¶
func (FakeLocker) RUnlock()
func (FakeLocker) Unlock ¶
func (FakeLocker) Unlock()
type Iterator ¶
type Iterator[V any] interface { IsValid() bool Next() Iterator[V] Value() V Clone() Iterator[V] Equal(other Iterator[V]) bool }
Iterator is an interface of const iterator
type KvBidIterator ¶
type KvBidIterator[K, V any] interface { KvIterator[K, V] MutableBidIterator[V] }
KvBidIterator is an interface of const key-value type bidirectional iterator
type KvIterator ¶
KvIterator is an interface of const key-value type iterator
type Map ¶
type Map[K, V any] interface { Get(key K) (V, bool) Set(key K, value V) Remove(key K) bool Has(key K) bool Clear() Len() int IsEmpty() bool Keys() []K Values() []V Range(func(key K, value V) bool) }
Map represents a generic map interface that can be implemented by different map types like HashMap, TreeMap, LinkedHashMap, SkipListMap, BTreeMap, etc.
type MutableBidIterator ¶
type MutableBidIterator[V any] interface { BidIterator[V] SetValue(value V) }
MutableBidIterator is an interface of mutable bidirectional iterator
type MutableIterator ¶
MutableIterator is an interface of mutable iterator
type MutableKvBidIterator ¶
type MutableKvBidIterator[K, V any] interface { MutableKvIterator[K, V] MutableBidIterator[V] }
MutableKvBidIterator is an interface of mutable key-value type bidirectional iterator
type MutableKvIterator ¶
type MutableKvIterator[K, V any] interface { KvIterator[K, V] SetValue(value V) }
MutableKvIterator is an interface of mutable key-value type iterator
type RandomAccessIterator ¶
type RandomAccessIterator[V any] interface { MutableBidIterator[V] // IteratorAt returns a new iterator at position IteratorAt(position int) RandomAccessIterator[V] Position() int }
RandomAccessIterator is an interface of mutable random access iterator