Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InsertAll ¶
func InsertAll[K constraints.Ordered, V any](m map[K]V, dict Dictionary[K, V])
InsertAll inserts all map elements in the dictionary.
Types ¶
type Container ¶
type Container[T any] interface { // List returns an iterator over all elements. List() lang.Iterator[T] // IsEmpty returns true if the container is empty. IsEmpty() bool }
Container is an abstract container of elements.
type Dictionary ¶
type Dictionary[K, V any] interface { // List returns an iterator over all elements in an implementation-defined order. List() lang.Iterator[KV[K, V]] // Find returns the value associated with the key, if present. Find(k K) (V, bool) // Insert sets the value of the key. Returns prior value, if present. Insert(k K, v V) (V, bool) // Remove removes the key. Returns removed value, if present. Remove(k K) (V, bool) }
Dictionary is an associative mapping, typically implemented as a hashtable or binary search tree.
Click to show internal directories.
Click to hide internal directories.