sortable

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OrderAscending

func OrderAscending[Type constraints.Ordered](i Type, j Type) bool

func OrderDescending

func OrderDescending[Type constraints.Ordered](i Type, j Type) bool

Types

type Sortable

type Sortable[Type any] struct {
	// contains filtered or unexported fields
}

func New

func New[Type any](collection []Type, less func(i, j Type) bool) Sortable[Type]

func (Sortable[Type]) Len

func (s Sortable[Type]) Len() int

func (Sortable[Type]) Less

func (s Sortable[Type]) Less(i, j int) bool

func (Sortable[Type]) Swap

func (s Sortable[Type]) Swap(i, j int)

Jump to

Keyboard shortcuts

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