Documentation ¶
Overview ¶
Package stream contains the implementations for the possible operations in a Stream
Index ¶
- Constants
- type Output
- func (o Output) Bool() bool
- func (o Output) Err() *errors.Error
- func (o Output) Float32() float32
- func (o Output) Float64() float64
- func (o Output) Int() int
- func (o Output) Int16() int16
- func (o Output) Int32() int32
- func (o Output) Int64() int64
- func (o Output) Int8() int8
- func (o Output) String() string
- func (o Output) Uint() uint
- func (o Output) Uint16() uint16
- func (o Output) Uint32() uint32
- func (o Output) Uint64() uint64
- func (o Output) Uint8() uint8
- func (o Output) Val() interface{}
- type Stream
- func (s Stream) Add(input interface{}) Stream
- func (s Stream) At(index int) *Output
- func (s Stream) Concat(input interface{}) Stream
- func (s Stream) Contains(element interface{}) (bool, *errors.Error)
- func (s Stream) Count() (int, *errors.Error)
- func (s Stream) DeleteAt(index int) Stream
- func (s Stream) Do() Stream
- func (s Stream) Drop(input interface{}) Stream
- func (s Stream) DropLeft(input interface{}) Stream
- func (s Stream) DropRight(input interface{}) Stream
- func (s Stream) DropWhile(fn interface{}) Stream
- func (s Stream) Filter(fn interface{}) Stream
- func (s Stream) First() *Output
- func (s Stream) ForEach(fn interface{}) Stream
- func (s Stream) GroupBy(fn interface{}) (reflect.Value, *errors.Error)
- func (s Stream) IndexOf(element interface{}) (int, *errors.Error)
- func (s Stream) IndexesOf(element interface{}) ([]int, *errors.Error)
- func (s Stream) Last() *Output
- func (s Stream) LastIndexOf(element interface{}) (int, *errors.Error)
- func (s Stream) Map(fn interface{}) Stream
- func (s Stream) Out() *Output
- func (s Stream) Pop() (*Output, Stream)
- func (s Stream) Reduce(fn interface{}) Output
- func (s Stream) RemoveDuplicates() Stream
- func (s Stream) Reverse() Stream
- func (s Stream) Set(index int, input interface{}) Stream
- func (s Stream) Sort(fn interface{}) Stream
- func (s Stream) Take(firstIndex, lastIndex int) Stream
- func (s Stream) With(data interface{}) Stream
Constants ¶
const OpCodeOut = "out"
OpCodeOut identifier for operation out
const OpCodeWith = "with"
OpCodeWith identifier for operation with
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Output ¶
type Output struct {
// contains filtered or unexported fields
}
Output structure for returning single values
type Stream ¶
type Stream struct {
// contains filtered or unexported fields
}
Stream stream structure
func New ¶
func New(items interface{}) Stream
New creates a Stream with the provided array of elements
func (Stream) DropWhile ¶ added in v0.0.4
DropWhile discard the elements in the Stream that don't match with the provided dropWhile
func (Stream) Filter ¶
Filter discard the elements in the Stream that don't match with the provided filter
func (Stream) GroupBy ¶ added in v0.0.4
IndexesOf check if the passed element is found in the Stream
func (Stream) IndexesOf ¶ added in v0.0.4
IndexesOf check if the passed element is found in the Stream
func (Stream) LastIndexOf ¶ added in v0.0.3
LastIndexOf check if the passed element is found in the Stream
func (Stream) Map ¶
Map performs a mutation over all the elements in the Stream and return a new Stream
func (Stream) RemoveDuplicates ¶
RemoveDuplicates remove all thoese elements are duplicated in the Stream, leaving only an element with the same value
Source Files ¶
- add.go
- at.go
- concat.go
- contains.go
- count.go
- deleteat.go
- do.go
- drop.go
- dropLeft.go
- dropRight.go
- dropWhile.go
- filter.go
- first.go
- forEach.go
- groupBy.go
- indexOf.go
- indexesOf.go
- last.go
- lastIndexOf.go
- map.go
- out.go
- package.go
- pop.go
- reduce.go
- removeduplicates.go
- reverse.go
- set.go
- sort.go
- stream.go
- take.go
- utils.go
- with.go