comparator

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Comparable

type Comparable[K constraints.Ordered] func(k1, k2 K) int

func New

func New[K constraints.Ordered](order Order) Comparable[K]

type Comparator

type Comparator[K constraints.Ordered] interface {
	Compare(k1, k2 K) int
	Asc()
	Desc()
}

func New2

func New2[K constraints.Ordered]() Comparator[K]

type Order

type Order int
const (
	ASC  Order = 1
	DESC Order = -1
)

Jump to

Keyboard shortcuts

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