Documentation ¶
Index ¶
- func CapFrom[TKey comparable, TValue any](e collections.Enumerator[collections.Tuple2[TKey, TValue]], capacity int, ...) collections.Dictionary[TKey, TValue]
- func CapNew[TKey comparable, TValue any](capacity int, comparer ...utils.Comparer[TKey]) collections.Dictionary[TKey, TValue]
- func From[TKey comparable, TValue any](e collections.Enumerator[collections.Tuple2[TKey, TValue]], ...) collections.Dictionary[TKey, TValue]
- func New[TKey comparable, TValue any](comparer ...utils.Comparer[TKey]) collections.Dictionary[TKey, TValue]
- func With[TKey comparable, TValue any, M ~map[TKey]TValue](m M, comparer ...utils.Comparer[TKey]) collections.Dictionary[TKey, TValue]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CapFrom ¶
func CapFrom[TKey comparable, TValue any](e collections.Enumerator[collections.Tuple2[TKey, TValue]], capacity int, comparer ...utils.Comparer[TKey]) collections.Dictionary[TKey, TValue]
CapFrom creates a new dictionary with sorted keys and an initial capacity populated with key/value pairs from the given tuple enumerator.
The keys are sorted with the optional given comparer function or the default comparer if no comparer was given.
func CapNew ¶
func CapNew[TKey comparable, TValue any](capacity int, comparer ...utils.Comparer[TKey]) collections.Dictionary[TKey, TValue]
CapNew creates a new dictionary with sorted keys and initial capacity by the optional given comparer function or the default comparer.
func From ¶
func From[TKey comparable, TValue any](e collections.Enumerator[collections.Tuple2[TKey, TValue]], comparer ...utils.Comparer[TKey]) collections.Dictionary[TKey, TValue]
From creates a new dictionary with sorted keys populated with key/value pairs from the given tuple enumerator.
The keys are sorted with the optional given comparer function or the default comparer if no comparer was given.
func New ¶
func New[TKey comparable, TValue any](comparer ...utils.Comparer[TKey]) collections.Dictionary[TKey, TValue]
New creates a new dictionary with sorted keys by the optional given comparer function or the default comparer.
func With ¶
func With[TKey comparable, TValue any, M ~map[TKey]TValue](m M, comparer ...utils.Comparer[TKey]) collections.Dictionary[TKey, TValue]
With creates a new dictionary with sorted keys populated with key/value pairs from the given map.
The keys are sorted with the optional given comparer function or the default comparer if no comparer was given.
Types ¶
This section is empty.