Documentation
¶
Index ¶
- func CapFrom[T any](e collections.Enumerator[T], capacity int, comparer ...comp.Comparer[T]) collections.SortedSet[T]
- func CapNew[T any](capacity int, comparer ...comp.Comparer[T]) collections.SortedSet[T]
- func From[T any](e collections.Enumerator[T], comparer ...comp.Comparer[T]) collections.SortedSet[T]
- func New[T any](comparer ...comp.Comparer[T]) collections.SortedSet[T]
- func With[T any](s []T, comparer ...comp.Comparer[T]) collections.SortedSet[T]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CapFrom ¶
func CapFrom[T any](e collections.Enumerator[T], capacity int, comparer ...comp.Comparer[T]) collections.SortedSet[T]
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 ¶
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[T any](e collections.Enumerator[T], comparer ...comp.Comparer[T]) collections.SortedSet[T]
From creates a new list from the given enumerator.
This may have an optional capacity for the list's initial capacity. Giving it a capacity will help when the enumerator contains a lot of values.
func New ¶
func New[T any](comparer ...comp.Comparer[T]) collections.SortedSet[T]
New creates a new list on an underlying array
The sizes specifies the optional initial length and capacity. If only one size if given, that is the initial size of this list as well as the initial capacity. If a second integer argument is provided it will specify a different capacity from the length. The capacity will never be smaller than the list's length.
Types ¶
This section is empty.