sortedSet

package
v0.5.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

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

func CapNew[T any](capacity int, comparer ...comp.Comparer[T]) collections.SortedSet[T]

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.

func With

func With[T any](s []T, comparer ...comp.Comparer[T]) collections.SortedSet[T]

With creates a new list with the given values.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL