comparator

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Comparator

type Comparator[T any] interface {
	Compare(one T, two T) int
}

func NewIntegerComparator

func NewIntegerComparator() Comparator[int]

func NewStringComparator

func NewStringComparator() Comparator[string]

type IntegerComparator

type IntegerComparator struct{}

func (IntegerComparator) Compare

func (ic IntegerComparator) Compare(one int, two int) int

type StringComparator

type StringComparator struct{}

func (StringComparator) Compare

func (tc StringComparator) Compare(one string, two string) int

Jump to

Keyboard shortcuts

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