Documentation
¶
Overview ¶
package orderedhashmap contains a simple and very inefficient ordered map using the map builtin for comparing against other ordered containers in tests.
Index ¶
- type Cursor
- func (c *Cursor[K, V]) Backward() iterator.Iterator[KVPair[K, V]]
- func (c *Cursor[K, V]) Forward() iterator.Iterator[KVPair[K, V]]
- func (c *Cursor[K, V]) Key() K
- func (c *Cursor[K, V]) Next()
- func (c *Cursor[K, V]) Ok() bool
- func (c *Cursor[K, V]) Prev()
- func (c *Cursor[K, V]) SeekFirst()
- func (c *Cursor[K, V]) SeekFirstGreater(k K)
- func (c *Cursor[K, V]) SeekFirstGreaterOrEqual(k K)
- func (c *Cursor[K, V]) SeekLast()
- func (c *Cursor[K, V]) SeekLastLess(k K)
- func (c *Cursor[K, V]) SeekLastLessOrEqual(k K)
- func (c *Cursor[K, V]) Value() V
- type KVPair
- type Map
- func (m Map[K, V]) Contains(k K) bool
- func (m Map[K, V]) Cursor() *Cursor[K, V]
- func (m Map[K, V]) Delete(k K)
- func (m Map[K, V]) First() (K, V)
- func (m Map[K, V]) Get(k K) V
- func (m Map[K, V]) Iterate() iterator.Iterator[KVPair[K, V]]
- func (m Map[K, V]) Last() (K, V)
- func (m Map[K, V]) Len() int
- func (m Map[K, V]) Put(k K, v V)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cursor ¶
type Cursor[K comparable, V any] struct { // contains filtered or unexported fields }
func (*Cursor[K, V]) SeekFirstGreater ¶
func (c *Cursor[K, V]) SeekFirstGreater(k K)
func (*Cursor[K, V]) SeekFirstGreaterOrEqual ¶
func (c *Cursor[K, V]) SeekFirstGreaterOrEqual(k K)
func (*Cursor[K, V]) SeekLastLess ¶
func (c *Cursor[K, V]) SeekLastLess(k K)
func (*Cursor[K, V]) SeekLastLessOrEqual ¶
func (c *Cursor[K, V]) SeekLastLessOrEqual(k K)
type Map ¶
type Map[K comparable, V any] struct { // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.