Documentation ¶
Index ¶
- type Stream
- func Floats(args ...float64) (*Stream, error)
- func Gen(genFunc interface{}) (*Stream, error)
- func Ints(args ...int64) (*Stream, error)
- func It(initValue interface{}, itFunc interface{}) (*Stream, error)
- func New(arr interface{}) (*Stream, error)
- func Of(args ...interface{}) (*Stream, error)
- func Strings(args ...string) (*Stream, error)
- func (s *Stream) AllMatch(matchFunc interface{}) bool
- func (s *Stream) AnyMatch(matchFunc interface{}) bool
- func (s *Stream) Call(callFunc interface{}) *Stream
- func (s *Stream) Check(checkFunc interface{}) *Stream
- func (s *Stream) Count() int
- func (s *Stream) Distinct(equalFunc interface{}) *Stream
- func (s *Stream) Exec()
- func (s *Stream) Filter(filterFunc interface{}) *Stream
- func (s *Stream) First(matchFunc interface{}) interface{}
- func (s *Stream) FlatMap(mapFunc interface{}) *Stream
- func (s *Stream) ForEach(actFunc interface{})
- func (s *Stream) Group(groupFunc interface{}) interface{}
- func (s *Stream) Last(matchFunc interface{}) interface{}
- func (s *Stream) Limit(num int) *Stream
- func (s *Stream) Map(mapFunc interface{}) *Stream
- func (s *Stream) Max(lessFunc interface{}) interface{}
- func (s *Stream) Min(lessFunc interface{}) interface{}
- func (s *Stream) NoneMatch(matchFunc interface{}) bool
- func (s *Stream) Peek(peekFunc interface{}) *Stream
- func (s *Stream) Reduce(initValue interface{}, reduceFunc interface{}) interface{}
- func (s *Stream) Reset() *Stream
- func (s *Stream) Skip(num int) *Stream
- func (s *Stream) Sort(lessFunc interface{}) *Stream
- func (s *Stream) ToSlice(targetSlice interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Stream ¶
type Stream struct {
// contains filtered or unexported fields
}
Stream ...
func (*Stream) Check ¶
Check operation. Check if should be continue process data. checkFunc: func(o []T) bool ,checkFunc must return if should be continue process data.
func (*Stream) First ¶
func (s *Stream) First(matchFunc interface{}) interface{}
First operation. matchFunc: func(o T) bool
func (*Stream) ForEach ¶
func (s *Stream) ForEach(actFunc interface{})
ForEach executes a provided function once for each array element,and terminate the stream. actFunc: func(o T)
func (*Stream) Group ¶
func (s *Stream) Group(groupFunc interface{}) interface{}
Group operation. Group values by key. Premeter groupFunc: func(o T1) (key T2,value T3). Return map[T2]T3
func (*Stream) Last ¶
func (s *Stream) Last(matchFunc interface{}) interface{}
Last operation. matchFunc: func(o T) bool
func (*Stream) Max ¶
func (s *Stream) Max(lessFunc interface{}) interface{}
Max operation.lessFunc: func(o1,o2 T) bool
func (*Stream) Min ¶
func (s *Stream) Min(lessFunc interface{}) interface{}
Min operation.lessFunc: func(o1,o2 T) bool
func (*Stream) Reduce ¶
func (s *Stream) Reduce(initValue interface{}, reduceFunc interface{}) interface{}
Reduce operation. reduceFunc: func(r T2,o T) T2
Click to show internal directories.
Click to hide internal directories.