definition

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultConvertToNumber

func DefaultConvertToNumber[T any](value any) T

DefaultConvertToNumber

func DefaultLessComparer

func DefaultLessComparer[T any](t1, t2 T) bool

DefaultLessComparer is the default compare when the first one is smaller than the second one

func DefaultMoreComparer

func DefaultMoreComparer[T any](t1, t2 T) bool

DefaultMoreComparer is the default compare when the first one is greater than the second one

func IsEmptyOrNil

func IsEmptyOrNil[T any](t []T) bool

func IsFloat

func IsFloat(i any) bool

func IsInt

func IsInt(i any) bool

func IsNumber

func IsNumber(i any) bool

func IsUint

func IsUint(i any) bool

Types

type Accumulator

type Accumulator[T any, K any] func(T, K) T

Accumulator represents an accumulator function to be invoked on each element.

type CombinationSelector

type CombinationSelector[T any, K any] func(T, K) any

CombinationSelector represents a function that combines two objects under T, K type to another object

type Comparer

type Comparer[T any] func(T, T) bool

Comparer represents a function that compares two variables of type T, there will be 3 cases: smaller, equal, larger depending on the purpose of use

type GetHashCode

type GetHashCode[T any] func(T) any

GetHashCode represents a function that gets hashcode from an object

type GroupBySelector

type GroupBySelector[T any, K any] func(T, []K) any

GroupBySelector represents a function that combines two objects under T, []K type to another object

type KeyValData added in v1.1.1

type KeyValData[K, V any] struct {
	Key K
	Val V
}

type SingleSelector

type SingleSelector[T any] func(T) any

SingleSelector represents a function that converts an object under T type to another object

type SingleSelectorFull

type SingleSelectorFull[T any, K any] func(T) K

SingleSelectorFull represents a function that converts an object under T type to another object under K type

Jump to

Keyboard shortcuts

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