Documentation
¶
Index ¶
- func ToGoMap[Key comparable, Value any](m *Map[Key, Value]) map[Key]Value
- type Map
- func FromGoMap[Key comparable, Value any](cmp comparator.Comparator[Key], goMap map[Key]Value) *Map[Key, Value]
- func FromKeyValuePairs[Key any, Value any](cmp comparator.Comparator[Key], kvPairs ...tuple.KeyValuePair[Key, Value]) *Map[Key, Value]
- func New[Key any, Value any](cmp comparator.Comparator[Key]) *Map[Key, Value]
- func (m *Map[Key, Value]) All() iter.Seq2[Key, Value]
- func (m *Map[Key, Value]) Count() int
- func (m *Map[Key, Value]) Delete(key Key) (newMap *Map[Key, Value], affected bool)
- func (m *Map[Key, Value]) Empty() bool
- func (m *Map[Key, Value]) Index(key Key) (value Value, has bool)
- func (m *Map[Key, Value]) Insert(key Key, value Value) (newMap *Map[Key, Value], affected bool)
- func (m *Map[Key, Value]) KeyValuePairs() []tuple.KeyValuePair[Key, Value]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToGoMap ¶
func ToGoMap[Key comparable, Value any](m *Map[Key, Value]) map[Key]Value
Types ¶
type Map ¶
type Map[Key any, Value any] immutable_rb_tree.RBTree[tuple.KeyValuePair[Key, Value]]
func FromGoMap ¶
func FromGoMap[Key comparable, Value any](cmp comparator.Comparator[Key], goMap map[Key]Value) *Map[Key, Value]
func FromKeyValuePairs ¶
func FromKeyValuePairs[Key any, Value any](cmp comparator.Comparator[Key], kvPairs ...tuple.KeyValuePair[Key, Value]) *Map[Key, Value]
func New ¶
func New[Key any, Value any](cmp comparator.Comparator[Key]) *Map[Key, Value]
func (*Map[Key, Value]) KeyValuePairs ¶
func (m *Map[Key, Value]) KeyValuePairs() []tuple.KeyValuePair[Key, Value]
Click to show internal directories.
Click to hide internal directories.