stream

package
v0.0.0-...-a3940bd Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2018 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicIntStream

type BasicIntStream struct {
	// contains filtered or unexported fields
}

func NewBasicIntStream

func NewBasicIntStream(openUpstreamFunc func(<-chan struct{}) <-chan int) BasicIntStream

func (BasicIntStream) Filter

func (s BasicIntStream) Filter(predicate func(interface{}) bool) Stream

func (BasicIntStream) FilterInt

func (s BasicIntStream) FilterInt(predicate func(int) bool) IntStream

func (BasicIntStream) ForEach

func (s BasicIntStream) ForEach(consumer func(interface{}))

func (BasicIntStream) ForEachInt

func (s BasicIntStream) ForEachInt(consumer func(int))

func (BasicIntStream) Map

func (s BasicIntStream) Map(mapper func(interface{}) interface{}) Stream

func (BasicIntStream) MapInt

func (s BasicIntStream) MapInt(mapper func(int) interface{}) Stream

type BasicStream

type BasicStream struct {
	// contains filtered or unexported fields
}

func NewBasicStream

func NewBasicStream(openUpstreamFunc func(<-chan struct{}) <-chan interface{}) BasicStream

func (BasicStream) Filter

func (s BasicStream) Filter(predicate func(interface{}) bool) Stream

func (BasicStream) ForEach

func (s BasicStream) ForEach(consumer func(interface{}))

func (BasicStream) Map

func (s BasicStream) Map(mapper func(interface{}) interface{}) Stream

func (BasicStream) MapToInt

func (s BasicStream) MapToInt(mapper func(interface{}) int) IntStream

type IntStream

type IntStream interface {
	Stream
	FilterInt(predicate func(int) bool) IntStream
	MapInt(mapper func(int) interface{}) Stream
	ForEachInt(consumer func(int))
}

type RangeIntStream

type RangeIntStream struct {
	// contains filtered or unexported fields
}

func IntStreamFromRange

func IntStreamFromRange(begin, end int) RangeIntStream

func IntStreamFromRangeAndStep

func IntStreamFromRangeAndStep(begin, end, step int) RangeIntStream

func IntStreamFromZeroTo

func IntStreamFromZeroTo(end int) RangeIntStream

func (RangeIntStream) Begin

func (s RangeIntStream) Begin() int

func (RangeIntStream) End

func (s RangeIntStream) End() int

func (RangeIntStream) Filter

func (s RangeIntStream) Filter(predicate func(interface{}) bool) Stream

func (RangeIntStream) FilterInt

func (s RangeIntStream) FilterInt(predicate func(int) bool) IntStream

func (RangeIntStream) ForEach

func (s RangeIntStream) ForEach(consumer func(interface{}))

func (RangeIntStream) ForEachInt

func (s RangeIntStream) ForEachInt(consumer func(int))

func (RangeIntStream) Map

func (s RangeIntStream) Map(mapper func(interface{}) interface{}) Stream

func (RangeIntStream) MapInt

func (s RangeIntStream) MapInt(mapper func(int) interface{}) Stream

func (RangeIntStream) Step

func (s RangeIntStream) Step() int

type SliceIntStream

type SliceIntStream struct {
	// contains filtered or unexported fields
}

func IntStreamOf

func IntStreamOf(values ...int) SliceIntStream

func (SliceIntStream) Cap

func (s SliceIntStream) Cap() int

func (SliceIntStream) Filter

func (s SliceIntStream) Filter(predicate func(interface{}) bool) Stream

func (SliceIntStream) FilterInt

func (s SliceIntStream) FilterInt(predicate func(int) bool) IntStream

func (SliceIntStream) ForEach

func (s SliceIntStream) ForEach(consumer func(interface{}))

func (SliceIntStream) ForEachInt

func (s SliceIntStream) ForEachInt(consumer func(int))

func (SliceIntStream) Get

func (s SliceIntStream) Get(index int) int

func (SliceIntStream) Len

func (s SliceIntStream) Len() int

func (SliceIntStream) Map

func (s SliceIntStream) Map(mapper func(interface{}) interface{}) Stream

func (SliceIntStream) MapInt

func (s SliceIntStream) MapInt(mapper func(int) interface{}) Stream

type SliceStream

type SliceStream struct {
	// contains filtered or unexported fields
}

func StreamOf

func StreamOf(values ...interface{}) SliceStream

func (SliceStream) Cap

func (s SliceStream) Cap() int

func (SliceStream) Filter

func (s SliceStream) Filter(predicate func(interface{}) bool) Stream

func (SliceStream) ForEach

func (s SliceStream) ForEach(consumer func(interface{}))

func (SliceStream) Get

func (s SliceStream) Get(index int) interface{}

func (SliceStream) Len

func (s SliceStream) Len() int

func (SliceStream) Map

func (s SliceStream) Map(mapper func(interface{}) interface{}) Stream

type Stream

type Stream interface {
	Filter(predicate func(interface{}) bool) Stream
	Map(mapper func(interface{}) interface{}) Stream
	//FlatMap(mapper func(interface{}) Stream) Stream
	//Distinct() Stream
	ForEach(consumer func(interface{}))
}

Jump to

Keyboard shortcuts

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