stream

package
v1.0.19 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: Apache-2.0 Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GroupBy

func GroupBy[K comparable, T any](ts []T, getKey func(t T) K) map[K][]T

Types

type Stream

type Stream[T any] struct {
	// contains filtered or unexported fields
}

func FlatMap

func FlatMap[T any](input [][]T) *Stream[T]

func Map

func Map[F, T any](fs []F, mapper func(f F) T) *Stream[T]

func Of

func Of[T comparable](ts []T) *Stream[T]

func (*Stream[T]) AnyMatch

func (stream *Stream[T]) AnyMatch(anyFunction func(t T) bool) bool

func (*Stream[T]) Filter

func (stream *Stream[T]) Filter(filter func(t T) bool) *Stream[T]

func (*Stream[T]) FindFirst

func (stream *Stream[T]) FindFirst() optional.Optional[T]

func (*Stream[T]) ForEach

func (stream *Stream[T]) ForEach(forEach func(t T))

func (*Stream[T]) NoneMatch

func (stream *Stream[T]) NoneMatch(anyFunction func(t T) bool) bool

func (*Stream[T]) Peek

func (stream *Stream[T]) Peek(peekFunc func(t T)) *Stream[T]

func (*Stream[T]) Reduce

func (stream *Stream[T]) Reduce(identity T, reduce func(a, b T) T) T

func (*Stream[T]) Slice

func (stream *Stream[T]) Slice() []T

func (*Stream[T]) Sort

func (stream *Stream[T]) Sort(sortFunction func(a, b T) bool) *Stream[T]

Jump to

Keyboard shortcuts

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