stream

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Map

type Map[K comparable, V any] map[K]V

func WithMap

func WithMap[K comparable, V any](m map[K]V) Map[K, V]

WithMap 将映射转换为流

func (Map[K, V]) Chunk added in v0.1.5

func (slf Map[K, V]) Chunk(size int) Maps[K, V]

Chunk 是 hash.Chunk 的快捷方式

func (Map[K, V]) Each added in v0.1.5

func (slf Map[K, V]) Each(abort bool, iterator func(i int, key K, item V) bool) Map[K, V]

Each 是 hash.Each 的快捷方式

func (Map[K, V]) EachF added in v0.1.5

func (slf Map[K, V]) EachF(iterator func(i int, key K, item V) bool) Map[K, V]

EachF 是 hash.EachF 的快捷方式

func (Map[K, V]) EachT added in v0.1.5

func (slf Map[K, V]) EachT(iterator func(i int, key K, item V) bool) Map[K, V]

EachT 是 hash.EachT 的快捷方式

func (Map[K, V]) Filter

func (slf Map[K, V]) Filter(reserve bool, expression func(key K, value V) bool) Map[K, V]

Filter 是 hash.Filter 的快捷方式

func (Map[K, V]) FilterCopy added in v0.1.5

func (slf Map[K, V]) FilterCopy(reserve bool, expression func(key K, value V) bool) Map[K, V]

FilterCopy 是 hash.FilterCopy 的快捷方式

func (Map[K, V]) FilterF added in v0.1.5

func (slf Map[K, V]) FilterF(expression func(key K, value V) bool) Map[K, V]

FilterF 是 hash.FilterF 的快捷方式

func (Map[K, V]) FilterFCopy added in v0.1.5

func (slf Map[K, V]) FilterFCopy(expression func(key K, value V) bool) Map[K, V]

FilterFCopy 是 hash.FilterFCopy 的快捷方式

func (Map[K, V]) FilterT added in v0.1.5

func (slf Map[K, V]) FilterT(expression func(key K, value V) bool) Map[K, V]

FilterT 是 hash.FilterT 的快捷方式

func (Map[K, V]) FilterTCopy added in v0.1.5

func (slf Map[K, V]) FilterTCopy(expression func(key K, value V) bool) Map[K, V]

FilterTCopy 是 hash.FilterTCopy 的快捷方式

func (Map[K, V]) Keys added in v0.1.5

func (slf Map[K, V]) Keys() Slice[K]

Keys 返回键列表

func (Map[K, V]) Map added in v0.1.5

func (slf Map[K, V]) Map() map[K]V

Map 返回映射

func (Map[K, V]) Values added in v0.1.5

func (slf Map[K, V]) Values() Slice[V]

Values 返回值列表

type Maps added in v0.2.3

type Maps[K comparable, V any] []Map[K, V]

func WithMaps added in v0.2.3

func WithMaps[K comparable, V any](maps ...map[K]V) Maps[K, V]

WithMaps 将多个 map 转换为流

func WithStreamMaps added in v0.2.3

func WithStreamMaps[K comparable, V any](maps ...Map[K, V]) Maps[K, V]

WithStreamMaps 将多个 map 转换为流

func (Maps[K, V]) Drop added in v0.2.3

func (slf Maps[K, V]) Drop(start, n int) Maps[K, V]

Drop 是 slice.Drop 的快捷方式

func (Maps[K, V]) DropBy added in v0.2.3

func (slf Maps[K, V]) DropBy(fn func(index int, value Map[K, V]) bool) Maps[K, V]

DropBy 是 slice.DropBy 的快捷方式

func (Maps[K, V]) Each added in v0.2.3

func (slf Maps[K, V]) Each(abort bool, iterator func(index int, item Map[K, V]) bool) Maps[K, V]

Each 是 slice.Each 的快捷方式

func (Maps[K, V]) EachF added in v0.2.3

func (slf Maps[K, V]) EachF(iterator func(index int, item Map[K, V]) bool) Maps[K, V]

EachF 是 slice.EachF 的快捷方式

func (Maps[K, V]) EachReverse added in v0.2.3

func (slf Maps[K, V]) EachReverse(abort bool, iterator func(index int, item Map[K, V]) bool) Maps[K, V]

EachReverse 是 slice.EachReverse 的快捷方式

func (Maps[K, V]) EachReverseF added in v0.2.3

func (slf Maps[K, V]) EachReverseF(iterator func(index int, item Map[K, V]) bool) Maps[K, V]

EachReverseF 是 slice.EachReverseF 的快捷方式

func (Maps[K, V]) EachReverseT added in v0.2.3

func (slf Maps[K, V]) EachReverseT(iterator func(index int, item Map[K, V]) bool) Maps[K, V]

EachReverseT 是 slice.EachReverseT 的快捷方式

func (Maps[K, V]) EachT added in v0.2.3

func (slf Maps[K, V]) EachT(iterator func(index int, item Map[K, V]) bool) Maps[K, V]

EachT 是 slice.EachT 的快捷方式

func (Maps[K, V]) FillBy added in v0.2.3

func (slf Maps[K, V]) FillBy(fn func(index int, value Map[K, V]) Map[K, V]) Maps[K, V]

FillBy 是 slice.FillBy 的快捷方式

func (Maps[K, V]) FillByCopy added in v0.2.3

func (slf Maps[K, V]) FillByCopy(fn func(index int, value Map[K, V]) Map[K, V]) Maps[K, V]

FillByCopy 是 slice.FillByCopy 的快捷方式

func (Maps[K, V]) FillUntil added in v0.2.3

func (slf Maps[K, V]) FillUntil(abort bool, fn func(index int, value Map[K, V]) (Map[K, V], bool)) Maps[K, V]

FillUntil 是 slice.FillUntil 的快捷方式

func (Maps[K, V]) FillUntilCopy added in v0.2.3

func (slf Maps[K, V]) FillUntilCopy(abort bool, fn func(index int, value Map[K, V]) (Map[K, V], bool)) Maps[K, V]

FillUntilCopy 是 slice.FillUntilCopy 的快捷方式

func (Maps[K, V]) FillUntilF added in v0.2.3

func (slf Maps[K, V]) FillUntilF(fn func(index int, value Map[K, V]) (Map[K, V], bool)) Maps[K, V]

FillUntilF 是 slice.FillUntilF 的快捷方式

func (Maps[K, V]) FillUntilFCopy added in v0.2.3

func (slf Maps[K, V]) FillUntilFCopy(fn func(index int, value Map[K, V]) (Map[K, V], bool)) Maps[K, V]

FillUntilFCopy 是 slice.FillUntilFCopy 的快捷方式

func (Maps[K, V]) FillUntilT added in v0.2.3

func (slf Maps[K, V]) FillUntilT(fn func(index int, value Map[K, V]) (Map[K, V], bool)) Maps[K, V]

FillUntilT 是 slice.FillUntilT 的快捷方式

func (Maps[K, V]) FillUntilTCopy added in v0.2.3

func (slf Maps[K, V]) FillUntilTCopy(fn func(index int, value Map[K, V]) (Map[K, V], bool)) Maps[K, V]

FillUntilTCopy 是 slice.FillUntilTCopy 的快捷方式

func (Maps[K, V]) Filter added in v0.2.3

func (slf Maps[K, V]) Filter(reserve bool, expression func(index int, item Map[K, V]) bool) Maps[K, V]

Filter 是 slice.Filter 的快捷方式

func (Maps[K, V]) FilterCopy added in v0.2.3

func (slf Maps[K, V]) FilterCopy(reserve bool, expression func(index int, item Map[K, V]) bool) Maps[K, V]

FilterCopy 是 slice.FilterCopy 的快捷方式

func (Maps[K, V]) FilterF added in v0.2.3

func (slf Maps[K, V]) FilterF(expression func(index int, item Map[K, V]) bool) Maps[K, V]

FilterF 是 slice.FilterF 的快捷方式

func (Maps[K, V]) FilterFCopy added in v0.2.3

func (slf Maps[K, V]) FilterFCopy(expression func(index int, item Map[K, V]) bool) Maps[K, V]

FilterFCopy 是 slice.FilterFCopy 的快捷方式

func (Maps[K, V]) FilterT added in v0.2.3

func (slf Maps[K, V]) FilterT(expression func(index int, item Map[K, V]) bool) Maps[K, V]

FilterT 是 slice.FilterT 的快捷方式

func (Maps[K, V]) FilterTCopy added in v0.2.3

func (slf Maps[K, V]) FilterTCopy(expression func(index int, item Map[K, V]) bool) Maps[K, V]

FilterTCopy 是 slice.FilterTCopy 的快捷方式

func (Maps[K, V]) Merge added in v0.2.3

func (slf Maps[K, V]) Merge() Map[K, V]

Merge 将多个 map 合并为一个 map,返回该 map 的流

  • 当多个 map 中存在相同 key 的元素时,将会发生随机覆盖

func (Maps[K, V]) Shuffle added in v0.2.3

func (slf Maps[K, V]) Shuffle() Maps[K, V]

Shuffle 是 slice.Shuffle 的快捷方式

func (Maps[K, V]) ShuffleCopy added in v0.2.3

func (slf Maps[K, V]) ShuffleCopy() Maps[K, V]

ShuffleCopy 是 slice.ShuffleCopy 的快捷方式

func (Maps[K, V]) UniqueBy added in v0.2.3

func (slf Maps[K, V]) UniqueBy(fn func(Map[K, V]) any) Maps[K, V]

UniqueBy 是 slice.UniqueBy 的快捷方式

type Slice

type Slice[V any] []V

func WithSlice

func WithSlice[V any](slice []V) Slice[V]

WithSlice 将切片转换为流

func (Slice[V]) Chunk added in v0.1.5

func (slf Slice[V]) Chunk(size int) Slices[V]

Chunk 是 slice.Chunk 的快捷方式

func (Slice[V]) Copy added in v0.1.5

func (slf Slice[V]) Copy() Slice[V]

Copy 复制一份切片

func (Slice[V]) Drop added in v0.1.5

func (slf Slice[V]) Drop(start, n int) Slice[V]

Drop 是 slice.Drop 的快捷方式

func (Slice[V]) DropBy added in v0.1.5

func (slf Slice[V]) DropBy(fn func(index int, value V) bool) Slice[V]

DropBy 是 slice.DropBy 的快捷方式

func (Slice[V]) Each added in v0.1.5

func (slf Slice[V]) Each(abort bool, iterator func(index int, item V) bool) Slice[V]

Each 是 slice.Each 的快捷方式

func (Slice[V]) EachF added in v0.1.5

func (slf Slice[V]) EachF(iterator func(index int, item V) bool) Slice[V]

EachF 是 slice.EachF 的快捷方式

func (Slice[V]) EachReverse added in v0.1.5

func (slf Slice[V]) EachReverse(abort bool, iterator func(index int, item V) bool) Slice[V]

EachReverse 是 slice.EachReverse 的快捷方式

func (Slice[V]) EachReverseF added in v0.1.5

func (slf Slice[V]) EachReverseF(iterator func(index int, item V) bool) Slice[V]

EachReverseF 是 slice.EachReverseF 的快捷方式

func (Slice[V]) EachReverseT added in v0.1.5

func (slf Slice[V]) EachReverseT(iterator func(index int, item V) bool) Slice[V]

EachReverseT 是 slice.EachReverseT 的快捷方式

func (Slice[V]) EachT added in v0.1.5

func (slf Slice[V]) EachT(iterator func(index int, item V) bool) Slice[V]

EachT 是 slice.EachT 的快捷方式

func (Slice[V]) FillBy added in v0.1.5

func (slf Slice[V]) FillBy(fn func(index int, value V) V) Slice[V]

FillBy 是 slice.FillBy 的快捷方式

func (Slice[V]) FillByCopy added in v0.1.5

func (slf Slice[V]) FillByCopy(fn func(index int, value V) V) Slice[V]

FillByCopy 是 slice.FillByCopy 的快捷方式

func (Slice[V]) FillUntil added in v0.1.5

func (slf Slice[V]) FillUntil(abort bool, fn func(index int, value V) (V, bool)) Slice[V]

FillUntil 是 slice.FillUntil 的快捷方式

func (Slice[V]) FillUntilCopy added in v0.1.5

func (slf Slice[V]) FillUntilCopy(abort bool, fn func(index int, value V) (V, bool)) Slice[V]

FillUntilCopy 是 slice.FillUntilCopy 的快捷方式

func (Slice[V]) FillUntilF added in v0.1.5

func (slf Slice[V]) FillUntilF(fn func(index int, value V) (V, bool)) Slice[V]

FillUntilF 是 slice.FillUntilF 的快捷方式

func (Slice[V]) FillUntilFCopy added in v0.1.5

func (slf Slice[V]) FillUntilFCopy(fn func(index int, value V) (V, bool)) Slice[V]

FillUntilFCopy 是 slice.FillUntilFCopy 的快捷方式

func (Slice[V]) FillUntilT added in v0.1.5

func (slf Slice[V]) FillUntilT(fn func(index int, value V) (V, bool)) Slice[V]

FillUntilT 是 slice.FillUntilT 的快捷方式

func (Slice[V]) FillUntilTCopy added in v0.1.5

func (slf Slice[V]) FillUntilTCopy(fn func(index int, value V) (V, bool)) Slice[V]

FillUntilTCopy 是 slice.FillUntilTCopy 的快捷方式

func (Slice[V]) Filter

func (slf Slice[V]) Filter(reserve bool, expression func(index int, item V) bool) Slice[V]

Filter 是 slice.Filter 的快捷方式

func (Slice[V]) FilterCopy added in v0.1.5

func (slf Slice[V]) FilterCopy(reserve bool, expression func(index int, item V) bool) Slice[V]

FilterCopy 是 slice.FilterCopy 的快捷方式

func (Slice[V]) FilterF added in v0.1.5

func (slf Slice[V]) FilterF(expression func(index int, item V) bool) Slice[V]

FilterF 是 slice.FilterF 的快捷方式

func (Slice[V]) FilterFCopy added in v0.1.5

func (slf Slice[V]) FilterFCopy(expression func(index int, item V) bool) Slice[V]

FilterFCopy 是 slice.FilterFCopy 的快捷方式

func (Slice[V]) FilterT added in v0.1.5

func (slf Slice[V]) FilterT(expression func(index int, item V) bool) Slice[V]

FilterT 是 slice.FilterT 的快捷方式

func (Slice[V]) FilterTCopy added in v0.1.5

func (slf Slice[V]) FilterTCopy(expression func(index int, item V) bool) Slice[V]

FilterTCopy 是 slice.FilterTCopy 的快捷方式

func (Slice[V]) Indexes added in v0.1.5

func (slf Slice[V]) Indexes() Slice[int]

Indexes 将切片转换为索引切片

func (Slice[V]) Map added in v0.1.5

func (slf Slice[V]) Map() Map[int, V]

Map 将切片转为 map

func (Slice[V]) Shuffle

func (slf Slice[V]) Shuffle() Slice[V]

Shuffle 是 slice.Shuffle 的快捷方式

func (Slice[V]) ShuffleCopy added in v0.1.5

func (slf Slice[V]) ShuffleCopy() Slice[V]

ShuffleCopy 是 slice.ShuffleCopy 的快捷方式

func (Slice[V]) Slice added in v0.1.5

func (slf Slice[V]) Slice() []V

Slice 返回切片

func (Slice[V]) UniqueBy added in v0.1.5

func (slf Slice[V]) UniqueBy(fn func(V) any) Slice[V]

UniqueBy 是 slice.UniqueBy 的快捷方式

func (Slice[V]) Zoom added in v0.1.5

func (slf Slice[V]) Zoom(newSize int) Slice[V]

Zoom 是 slice.Zoom 的快捷方式

type Slices added in v0.1.5

type Slices[V any] []Slice[V]

func WithSlices added in v0.2.3

func WithSlices[V any](slices ...[]V) Slices[V]

WithSlices 将多个切片转换为流

func WithStreamSlices added in v0.2.3

func WithStreamSlices[V any](slices ...Slice[V]) Slices[V]

WithStreamSlices 将多个切片转换为流

func (Slices[V]) Drop added in v0.1.5

func (slf Slices[V]) Drop(start, n int) Slices[V]

Drop 是 slice.Drop 的快捷方式

func (Slices[V]) DropBy added in v0.1.5

func (slf Slices[V]) DropBy(fn func(index int, value Slice[V]) bool) Slices[V]

DropBy 是 slice.DropBy 的快捷方式

func (Slices[V]) Each added in v0.1.5

func (slf Slices[V]) Each(abort bool, iterator func(index int, item Slice[V]) bool) Slices[V]

Each 是 slice.Each 的快捷方式

func (Slices[V]) EachF added in v0.1.5

func (slf Slices[V]) EachF(iterator func(index int, item Slice[V]) bool) Slices[V]

EachF 是 slice.EachF 的快捷方式

func (Slices[V]) EachReverse added in v0.1.5

func (slf Slices[V]) EachReverse(abort bool, iterator func(index int, item Slice[V]) bool) Slices[V]

EachReverse 是 slice.EachReverse 的快捷方式

func (Slices[V]) EachReverseF added in v0.1.5

func (slf Slices[V]) EachReverseF(iterator func(index int, item Slice[V]) bool) Slices[V]

EachReverseF 是 slice.EachReverseF 的快捷方式

func (Slices[V]) EachReverseT added in v0.1.5

func (slf Slices[V]) EachReverseT(iterator func(index int, item Slice[V]) bool) Slices[V]

EachReverseT 是 slice.EachReverseT 的快捷方式

func (Slices[V]) EachT added in v0.1.5

func (slf Slices[V]) EachT(iterator func(index int, item Slice[V]) bool) Slices[V]

EachT 是 slice.EachT 的快捷方式

func (Slices[V]) FillBy added in v0.1.5

func (slf Slices[V]) FillBy(fn func(index int, value Slice[V]) Slice[V]) Slices[V]

FillBy 是 slice.FillBy 的快捷方式

func (Slices[V]) FillByCopy added in v0.1.5

func (slf Slices[V]) FillByCopy(fn func(index int, value Slice[V]) Slice[V]) Slices[V]

FillByCopy 是 slice.FillByCopy 的快捷方式

func (Slices[V]) FillUntil added in v0.1.5

func (slf Slices[V]) FillUntil(abort bool, fn func(index int, value Slice[V]) (Slice[V], bool)) Slices[V]

FillUntil 是 slice.FillUntil 的快捷方式

func (Slices[V]) FillUntilCopy added in v0.1.5

func (slf Slices[V]) FillUntilCopy(abort bool, fn func(index int, value Slice[V]) (Slice[V], bool)) Slices[V]

FillUntilCopy 是 slice.FillUntilCopy 的快捷方式

func (Slices[V]) FillUntilF added in v0.1.5

func (slf Slices[V]) FillUntilF(fn func(index int, value Slice[V]) (Slice[V], bool)) Slices[V]

FillUntilF 是 slice.FillUntilF 的快捷方式

func (Slices[V]) FillUntilFCopy added in v0.1.5

func (slf Slices[V]) FillUntilFCopy(fn func(index int, value Slice[V]) (Slice[V], bool)) Slices[V]

FillUntilFCopy 是 slice.FillUntilFCopy 的快捷方式

func (Slices[V]) FillUntilT added in v0.1.5

func (slf Slices[V]) FillUntilT(fn func(index int, value Slice[V]) (Slice[V], bool)) Slices[V]

FillUntilT 是 slice.FillUntilT 的快捷方式

func (Slices[V]) FillUntilTCopy added in v0.1.5

func (slf Slices[V]) FillUntilTCopy(fn func(index int, value Slice[V]) (Slice[V], bool)) Slices[V]

FillUntilTCopy 是 slice.FillUntilTCopy 的快捷方式

func (Slices[V]) Filter added in v0.1.5

func (slf Slices[V]) Filter(reserve bool, expression func(index int, item Slice[V]) bool) Slices[V]

Filter 是 slice.Filter 的快捷方式

func (Slices[V]) FilterCopy added in v0.1.5

func (slf Slices[V]) FilterCopy(reserve bool, expression func(index int, item Slice[V]) bool) Slices[V]

FilterCopy 是 slice.FilterCopy 的快捷方式

func (Slices[V]) FilterF added in v0.1.5

func (slf Slices[V]) FilterF(expression func(index int, item Slice[V]) bool) Slices[V]

FilterF 是 slice.FilterF 的快捷方式

func (Slices[V]) FilterFCopy added in v0.1.5

func (slf Slices[V]) FilterFCopy(expression func(index int, item Slice[V]) bool) Slices[V]

FilterFCopy 是 slice.FilterFCopy 的快捷方式

func (Slices[V]) FilterT added in v0.1.5

func (slf Slices[V]) FilterT(expression func(index int, item Slice[V]) bool) Slices[V]

FilterT 是 slice.FilterT 的快捷方式

func (Slices[V]) FilterTCopy added in v0.1.5

func (slf Slices[V]) FilterTCopy(expression func(index int, item Slice[V]) bool) Slices[V]

FilterTCopy 是 slice.FilterTCopy 的快捷方式

func (Slices[V]) Merge added in v0.1.5

func (slf Slices[V]) Merge() Slice[V]

Merge 合并为一个切片

func (Slices[V]) Shuffle added in v0.1.5

func (slf Slices[V]) Shuffle() Slices[V]

Shuffle 是 slice.Shuffle 的快捷方式

func (Slices[V]) ShuffleCopy added in v0.1.5

func (slf Slices[V]) ShuffleCopy() Slices[V]

ShuffleCopy 是 slice.ShuffleCopy 的快捷方式

func (Slices[V]) UniqueBy added in v0.1.5

func (slf Slices[V]) UniqueBy(fn func(Slice[V]) any) Slices[V]

UniqueBy 是 slice.UniqueBy 的快捷方式

Jump to

Keyboard shortcuts

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