CollectionUtils

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllMatch added in v0.1.2

func AllMatch(list interface{}, action matchFunc) bool

func AnyMatch added in v0.1.2

func AnyMatch(list interface{}, action matchFunc) bool

func FlatMapToStringSlice added in v0.3.9

func FlatMapToStringSlice(list interface{}, action func(i int) []string) []string

func ForEach added in v0.1.2

func ForEach(list interface{}, action func(i int))

func IndexOf added in v0.4.8

func IndexOf(list interface{}, match func(i int) bool) int

IndexOf find index of list elements if not find, return -1

func IsEmpty

func IsEmpty(collection interface{}) bool

func IsNotEmpty

func IsNotEmpty(collection interface{}) bool

func MapToFloat32Slice added in v0.1.0

func MapToFloat32Slice(list interface{}, action func(i int) float32) []float32

extract float32 field from list

func MapToFloat64Slice added in v0.1.0

func MapToFloat64Slice(list interface{}, action func(i int) float64) []float64

extract float64 field from list

func MapToInt64Slice added in v0.1.0

func MapToInt64Slice(list interface{}, action func(i int) int64) []int64

extract int64 field from list

func MapToIntSlice added in v0.1.0

func MapToIntSlice(list interface{}, action func(i int) int) []int

extract int field from list

func MapToStringSlice added in v0.1.0

func MapToStringSlice(list interface{}, action func(i int) string) []string

MapToStringSlice extract string field from list

func MapToStringSliceIgnoreByCondition added in v0.1.6

func MapToStringSliceIgnoreByCondition(list interface{}, action func(i int) string, condition func(s string) bool) []string

func MapToStringSliceIgnoreEmpty added in v0.2.5

func MapToStringSliceIgnoreEmpty(list interface{}, action func(i int) string) []string

func NoneMatch added in v0.1.2

func NoneMatch(list interface{}, action matchFunc) bool

func Sort added in v0.4.8

func Sort(list interface{}, less func(i, j int) bool)

func ToString added in v0.5.4

func ToString(list interface{}) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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