package
module
Version:
v0.0.2
Opens a new window with list of versions in this module.
Published: Apr 10, 2022
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Documentation
¶
type Direction[Key key.Keyable, Value any] interface {
Select[Key, Value]
Ascending() Select[Key, Value]
Descending() Select[Key, Value]
}
type Iterator[Key key.Keyable, Value any] interface {
Next() (Pair[Key, Value], Query[Key, Value], bool)
}
type Pair[Key key.Keyable, Value any] interface {
Key() Key
Value() Value
}
Pair stores Key/Value pairs
type Query[Key key.Keyable, Value any] interface {
Iterator[Key, Value]
ForEach(ForEach[Key, Value])
Where(Filter[Key, Value]) Query[Key, Value]
While(Filter[Key, Value]) Query[Key, Value]
}
type Select[Key key.Keyable, Value any] interface {
All() Query[Key, Value]
From(Key) Query[Key, Value]
}
type Trie[Key key.Keyable, Value any] interface {
Read[Key, Value]
Split[Key, Value]
Write[Key, Value]
}
Trie maps a set of Keys to another set of Values
From builds a Trie from a map with string keys
New returns a new empty Trie instance
type Write[Key key.Keyable, Value any] interface {
Put(Key, Value) Trie[Key, Value]
Remove(Key) (Value, Trie[Key, Value], bool)
RemovePrefix(Key) (Trie[Key, Value], bool)
}
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.