stream

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Stream

type Stream[T any] interface {
	iterator.Iterable[T]
	All(predicate func(T) bool) bool
	Any(predicate func(T) bool) bool
	Once(predicate func(T) bool) bool
	None(predicate func(T) bool) bool
	Chain(o iterator.Iterable[T]) Stream[T]
	Map(transformer func(T) T) Stream[T]
	Filter(predicate func(T) bool) Stream[T]
	Reduce(reduce func(T, T) T) optional.Optional[T]
	Flatten(flatten func(T) iterator.Iterator[T]) Stream[T]
	Inspect(inspect func(T)) Stream[T]
	MaxBy(ord cmp.OrdFunc[T]) optional.Optional[T]
	MinBy(ord cmp.OrdFunc[T]) optional.Optional[T]
	Equal(o iterator.Iterable[T], ord cmp.EqFunc[T]) bool
	Collect() []T
	Nth(n uint) optional.Optional[T]
	Take(n uint) Stream[T]
	Skip(n uint) Stream[T]
	TakeWhile(predicate func(T) bool) Stream[T]
	SkipWhile(predicate func(T) bool) Stream[T]
	ForEach(consumer func(T))
	StepBy(step uint) Stream[T]
	Last() optional.Optional[T]
	Advancing(step uint) Stream[T]
	IsSorted(ord cmp.OrdFunc[T]) bool
}

func FromIterable

func FromIterable[T any](iterable iterator.Iterable[T]) Stream[T]

func FromIterator

func FromIterator[T any](iter iterator.Iterator[T]) Stream[T]

Jump to

Keyboard shortcuts

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