Documentation ¶
Index ¶
- Variables
- func CompareToOrdered[T Ordered](a, b T) int
- func Compose[T any](fnList ...func(...T) []T) func(...T) []T
- func ComposeInterface(fnList ...func(...interface{}) []interface{}) func(...interface{}) []interface{}
- func Concat[T any](mine []T, slices ...[]T) []T
- func CurryParam1[T any, R any, A any](fn func(A, ...T) R, a A) func(...T) R
- func CurryParam1ForSlice1[T any, R any, A any](fn func(A, []T) R, a A) func(...T) R
- func CurryParam2[T any, R any, A any, B any](fn func(A, B, ...T) R, a A, b B) func(...T) R
- func CurryParam3[T any, R any, A any, B any, C any](fn func(A, B, C, ...T) R, a A, b B, c C) func(...T) R
- func CurryParam4[T any, R any, A any, B any, C any, D any](fn func(A, B, C, D, ...T) R, a A, b B, c C, d D) func(...T) R
- func CurryParam5[T any, R any, A any, B any, C any, D any, E any](fn func(A, B, C, D, E, ...T) R, a A, b B, c C, d D, e E) func(...T) R
- func CurryParam6[T any, R any, A any, B any, C any, D any, E any, F any](fn func(A, B, C, D, E, F, ...T) R, a A, b B, c C, d D, e E, f F) func(...T) R
- func Dedupe[T comparable](list ...T) []T
- func Difference[T comparable](arrList ...[]T) []T
- func Distinct[T comparable](list ...T) []T
- func DistinctForInterface(list ...interface{}) []interface{}
- func DistinctRandom[T comparable](list ...T) []T
- func Drop[T any](count int, list ...T) []T
- func DropEq[T comparable](num T, list ...T) []T
- func DropLast[T any](count int, list ...T) []T
- func DropWhile[T any](f Predicate[T], list ...T) []T
- func DuplicateMap[T comparable, R any](input map[T]R) map[T]R
- func DuplicateMapForInterface[R any](input map[interface{}]R) map[interface{}]R
- func DuplicateSlice[T any](list []T) []T
- func Either(value interface{}, patterns ...Pattern) interface{}
- func Every[T any](f Predicate[T], list ...T) bool
- func Exists[T comparable](input T, list ...T) bool
- func ExistsForInterface(input interface{}, list ...interface{}) bool
- func Filter[T any](fn func(T, int) bool, input ...T) []T
- func Flatten[T any](list ...[]T) []T
- func GroupBy[T any, R comparable](grouper TransformerFunctor[T, R], list ...T) map[R][]T
- func Head[T any](list ...T) T
- func Intersection[T comparable](inputList ...[]T) []T
- func IntersectionForInterface(inputList ...[]interface{}) []interface{}
- func IntersectionMapByKey[T comparable, R any](inputList ...map[T]R) map[T]R
- func IntersectionMapByKeyForInterface[R any](inputList ...map[interface{}]R) map[interface{}]R
- func IsDistinct[T comparable](list ...T) bool
- func IsEqual[T comparable](list1, list2 []T) bool
- func IsEqualMap[T comparable, R comparable](map1, map2 map[T]R) bool
- func IsNeg[T Numeric](v T) bool
- func IsNil(obj interface{}) bool
- func IsPos[T Numeric](v T) bool
- func IsPtr(obj interface{}) bool
- func IsSubset[T comparable](list1, list2 []T) bool
- func IsSubsetForInterface(list1, list2 []interface{}) bool
- func IsSubsetMapByKey[T comparable, R any](item1, item2 map[T]R) bool
- func IsSubsetMapByKeyForInterface[R any](item1, item2 map[interface{}]R) bool
- func IsSuperset[T comparable](list1, list2 []T) bool
- func IsSupersetForInterface(list1, list2 []interface{}) bool
- func IsSupersetMapByKey[T comparable, R any](item1, item2 map[T]R) bool
- func IsSupersetMapByKeyForInterface[R any](item1, item2 map[interface{}]R) bool
- func IsZero[T Numeric](v T) bool
- func Keys[T comparable, R any](m map[T]R) []T
- func KeysForInterface[R any](m map[interface{}]R) []interface{}
- func Kind(obj interface{}) reflect.Kind
- func MakeNumericReturnForParam1ReturnBool1[T any, R Numeric](fn func(T) bool) func(...T) []R
- func MakeNumericReturnForSliceParamReturnBool1[T any, R Numeric](fn func([]T) bool) func(...T) []R
- func MakeNumericReturnForVariadicParamReturnBool1[T any, R Numeric](fn func(...T) bool) func(...T) []R
- func MakeVariadicParam1[T any, R any](fn func(T) []R) func(...T) []R
- func MakeVariadicParam2[T any, R any](fn func(T, T) []R) func(...T) []R
- func MakeVariadicParam3[T any, R any](fn func(T, T, T) []R) func(...T) []R
- func MakeVariadicParam4[T any, R any](fn func(T, T, T, T) []R) func(...T) []R
- func MakeVariadicParam5[T any, R any](fn func(T, T, T, T, T) []R) func(...T) []R
- func MakeVariadicParam6[T any, R any](fn func(T, T, T, T, T, T) []R) func(...T) []R
- func MakeVariadicReturn1[T any, R any](fn func(...T) R) func(...T) []R
- func MakeVariadicReturn2[T any, R any](fn func(...T) (R, R)) func(...T) []R
- func MakeVariadicReturn3[T any, R any](fn func(...T) (R, R, R)) func(...T) []R
- func MakeVariadicReturn4[T any, R any](fn func(...T) (R, R, R, R)) func(...T) []R
- func MakeVariadicReturn5[T any, R any](fn func(...T) (R, R, R, R, R)) func(...T) []R
- func MakeVariadicReturn6[T any, R any](fn func(...T) (R, R, R, R, R, R)) func(...T) []R
- func Map[T any, R any](fn TransformerFunctor[T, R], values ...T) []R
- func MapIndexed[T any, R any](fn func(T, int) R, values ...T) []R
- func MatchCompType(compType CompType, value CompData) bool
- func MatchCompTypeRef(compType CompType, value *CompData) bool
- func Max[T Numeric](list ...T) T
- func Merge[T comparable, R any](map1, map2 map[T]R) map[T]R
- func MergeForInterface[R any](map1, map2 map[interface{}]R) map[interface{}]R
- func Min[T Numeric](list ...T) T
- func MinMax[T Numeric](list ...T) (T, T)
- func Minus[T comparable](set1, set2 []T) []T
- func MinusForInterface(set1, set2 []interface{}) []interface{}
- func MinusMapByKey[T comparable, R any](set1, set2 map[T]R) map[T]R
- func PMap[T any, R any](f TransformerFunctor[T, R], option *PMapOption, list ...T) []R
- func Partition[T any](predicate Predicate[T], list ...T) [][]T
- func Pipe[T any](fnList ...func(...T) []T) func(...T) []T
- func PipeInterface(fnList ...func(...interface{}) []interface{}) func(...interface{}) []interface{}
- func Prepend[T any](element T, list []T) []T
- func PtrOf[T any](v T) *T
- func Range[T Numeric](lower, higher T, hops ...T) []T
- func Reduce[T any, R any](fn ReducerFunctor[T, R], memo R, input ...T) R
- func ReduceIndexed[T any, R any](fn func(R, T, int) R, memo R, input ...T) R
- func Reject[T any](fn func(T, int) bool, input ...T) []T
- func Reverse[T any](list ...T) []T
- func SliceOf[T any](args ...T) []T
- func SliceToMap[T comparable, R any](defaultValue R, input ...T) map[T]R
- func SliceToMapForInterface[R any](defaultValue R, input ...interface{}) map[interface{}]R
- func Some[T any](f Predicate[T], list ...T) bool
- func Sort[T any](fn Comparator[T], input []T)
- func SortBySortDescriptors[T any](sortDescriptors []SortDescriptor[T], input []T)
- func SortOrdered[T Ordered](ascending bool, input ...T) []T
- func SortOrderedAscending[T Ordered](input ...T) []T
- func SortOrderedDescending[T Ordered](input ...T) []T
- func SortSlice[T any](fn Comparator[T], input ...T) []T
- func SortedListBySortDescriptors[T any](sortDescriptors []SortDescriptor[T], input ...T) []T
- func SplitEvery[T any](size int, list ...T) [][]T
- func Tail[T any](list ...T) []T
- func Take[T any](count int, list ...T) []T
- func TakeLast[T any](count int, list ...T) []T
- func Trampoline[T any](fn func(...T) ([]T, bool, error), input ...T) ([]T, error)
- func Union[T comparable](arrList ...[]T) []T
- func UniqBy[T any, R comparable](identify TransformerFunctor[T, R], list ...T) []T
- func Values[T comparable, R any](m map[T]R) []R
- func ValuesForInterface[R any](m map[interface{}]R) []R
- func Zip[T comparable, R any](list1 []T, list2 []R) map[T]R
- type ActorDef
- func (actorSelf *ActorDef[T]) Close()
- func (actorSelf *ActorDef[T]) GetChild(id time.Time) *ActorDef[T]
- func (actorSelf *ActorDef[T]) GetDefault() *ActorDef[interface{}]
- func (actorSelf *ActorDef[T]) GetID() time.Time
- func (actorSelf *ActorDef[T]) GetParent() *ActorDef[T]
- func (actorSelf *ActorDef[T]) IsClosed() bool
- func (actorSelf *ActorDef[T]) New(effect func(*ActorDef[T], T)) *ActorDef[T]
- func (actorSelf *ActorDef[T]) NewByOptions(effect func(*ActorDef[T], T), ioCh chan T, context map[string]interface{}) *ActorDef[T]
- func (actorSelf *ActorDef[T]) Send(message T)
- func (actorSelf *ActorDef[T]) Spawn(effect func(*ActorDef[T], T)) *ActorDef[T]
- type ActorHandle
- type AskDef
- func (askSelf *AskDef[T, R]) AskChannel(target ActorHandle[interface{}]) chan R
- func (askSelf *AskDef[T, R]) AskOnce(target ActorHandle[interface{}]) R
- func (askSelf *AskDef[T, R]) AskOnceWithTimeout(target ActorHandle[interface{}], timeout time.Duration) (R, error)
- func (askSelf *AskDef[T, R]) New(message T) *AskDef[T, R]
- func (askSelf *AskDef[T, R]) NewByOptions(message T, ioCh chan R) *AskDef[T, R]
- func (askSelf *AskDef[T, R]) Reply(response R)
- type AtomBool
- type BufferedChannelQueue
- func (q *BufferedChannelQueue[T]) Close()
- func (q *BufferedChannelQueue[T]) Count() int
- func (q *BufferedChannelQueue[T]) GetBufferSizeMaximum() int
- func (q *BufferedChannelQueue[T]) GetChannel() chan T
- func (q *BufferedChannelQueue[T]) GetFreeNodeHookPoolIntervalDuration() time.Duration
- func (q *BufferedChannelQueue[T]) GetLoadFromPoolDuration() time.Duration
- func (q *BufferedChannelQueue[T]) GetNodeHookPoolSize() int
- func (q *BufferedChannelQueue[T]) IsClosed() bool
- func (q *BufferedChannelQueue[T]) Offer(val T) error
- func (q *BufferedChannelQueue[T]) Poll() (T, error)
- func (q *BufferedChannelQueue[T]) Put(val T) error
- func (q *BufferedChannelQueue[T]) PutWithTimeout(val T, timeout time.Duration) error
- func (q *BufferedChannelQueue[T]) SetBufferSizeMaximum(size int) *BufferedChannelQueue[T]
- func (q *BufferedChannelQueue[T]) SetFreeNodeHookPoolIntervalDuration(duration time.Duration) *BufferedChannelQueue[T]
- func (q *BufferedChannelQueue[T]) SetLoadFromPoolDuration(duration time.Duration) *BufferedChannelQueue[T]
- func (q *BufferedChannelQueue[T]) SetNodeHookPoolSize(size int) *BufferedChannelQueue[T]
- func (q *BufferedChannelQueue[T]) Take() (T, error)
- func (q *BufferedChannelQueue[T]) TakeWithTimeout(timeout time.Duration) (T, error)
- type ChannelQueue
- func (q ChannelQueue[T]) Offer(val T) error
- func (q ChannelQueue[T]) Poll() (T, error)
- func (q ChannelQueue[T]) Put(val T) error
- func (q ChannelQueue[T]) PutWithTimeout(val T, timeout time.Duration) error
- func (q ChannelQueue[T]) Take() (T, error)
- func (q ChannelQueue[T]) TakeWithTimeout(timeout time.Duration) (T, error)
- type CompData
- type CompType
- type CompTypePatternDef
- type Comparable
- type ComparableOrdered
- type ComparableString
- type Comparator
- type ConcurrentQueue
- type ConcurrentStack
- type CorDef
- func (corSelf *CorDef[T]) DoNotation(effect func(*CorDef[T]) T) T
- func (corSelf *CorDef[T]) IsDone() bool
- func (corSelf *CorDef[T]) IsStarted() bool
- func (corSelf *CorDef[T]) New(effect func()) *CorDef[interface{}]
- func (corSelf *CorDef[T]) NewAndStart(effect func()) *CorDef[T]
- func (corSelf *CorDef[T]) Start()
- func (corSelf *CorDef[T]) StartWithVal(in T)
- func (corSelf *CorDef[T]) YieldFrom(target *CorDef[T], in T) T
- func (corSelf *CorDef[T]) YieldFromIO(target *MonadIODef[T]) T
- func (corSelf *CorDef[T]) YieldRef(out T) T
- type CorOp
- type CurryDef
- type DoublyListItem
- func (listItem *DoublyListItem[T]) AddFirst(input *DoublyListItem[T]) *DoublyListItem[T]
- func (listItem *DoublyListItem[T]) AddLast(input *DoublyListItem[T]) *DoublyListItem[T]
- func (listItem *DoublyListItem[T]) Count() int
- func (listItem *DoublyListItem[T]) First() *DoublyListItem[T]
- func (listItem *DoublyListItem[T]) Last() *DoublyListItem[T]
- type EqualPatternDef
- type FieldSortDescriptor
- type HandlerDef
- type KindPatternDef
- type LinkedListItem
- type LinkedListQueue
- func (q *LinkedListQueue[T]) Clear()
- func (q *LinkedListQueue[T]) ClearNodePool()
- func (q *LinkedListQueue[T]) Count() int
- func (q *LinkedListQueue[T]) KeepNodePoolCount(n int)
- func (q *LinkedListQueue[T]) Offer(val T) error
- func (q *LinkedListQueue[T]) Peek() (T, error)
- func (q *LinkedListQueue[T]) Poll() (T, error)
- func (q *LinkedListQueue[T]) Pop() (T, error)
- func (q *LinkedListQueue[T]) Push(val T) error
- func (q *LinkedListQueue[T]) Put(val T) error
- func (q *LinkedListQueue[T]) Shift() (T, error)
- func (q *LinkedListQueue[T]) Take() (T, error)
- func (q *LinkedListQueue[T]) Unshift(val T) error
- type MapSetDef
- func (mapSetSelf *MapSetDef[T, R]) Add(input ...T) SetDef[T, R]
- func (mapSetSelf *MapSetDef[T, R]) AsMap() map[T]R
- func (mapSetSelf *MapSetDef[T, R]) AsMapSet() *MapSetDef[T, R]
- func (mapSetSelf *MapSetDef[T, R]) Clone() SetDef[T, R]
- func (mapSetSelf *MapSetDef[T, R]) ContainsKey(input T) bool
- func (mapSetSelf *MapSetDef[T, R]) ContainsValue(input R) bool
- func (mapSetSelf *MapSetDef[T, R]) Get(key T) R
- func (mapSetSelf *MapSetDef[T, R]) Intersection(input SetDef[T, R]) SetDef[T, R]
- func (mapSetSelf *MapSetDef[T, R]) IsSubsetByKey(input SetDef[T, R]) bool
- func (mapSetSelf *MapSetDef[T, R]) IsSupersetByKey(input SetDef[T, R]) bool
- func (mapSetSelf *MapSetDef[T, R]) Keys() []T
- func (mapSetSelf *MapSetDef[T, R]) MapKey(fn TransformerFunctor[T, T]) SetDef[T, R]
- func (mapSetSelf *MapSetDef[T, R]) MapValue(fn TransformerFunctor[R, R]) SetDef[T, R]
- func (mapSetSelf *MapSetDef[T, R]) Minus(input SetDef[T, R]) SetDef[T, R]
- func (mapSetSelf *MapSetDef[T, R]) RemoveKeys(input ...T) SetDef[T, R]
- func (mapSetSelf *MapSetDef[T, R]) RemoveValues(input ...R) SetDef[T, R]
- func (mapSetSelf *MapSetDef[T, R]) Set(key T, value R)
- func (mapSetSelf *MapSetDef[T, R]) Size() int
- func (mapSetSelf *MapSetDef[T, R]) Union(input SetDef[T, R]) SetDef[T, R]
- func (mapSetSelf *MapSetDef[T, R]) Values() []R
- type MaybeDef
- type MonadIODef
- func (monadIOSelf *MonadIODef[T]) Eval() T
- func (monadIOSelf *MonadIODef[T]) FlatMap(fn func(T) *MonadIODef[T]) *MonadIODef[T]
- func (monadIOSelf MonadIODef[T]) Just(in interface{}) *MonadIODef[interface{}]
- func (monadIOSelf *MonadIODef[T]) New(effect func() T) *MonadIODef[T]
- func (monadIOSelf *MonadIODef[T]) ObserveOn(h *HandlerDef) *MonadIODef[T]
- func (monadIOSelf *MonadIODef[T]) Subscribe(s Subscription[T]) *Subscription[T]
- func (monadIOSelf *MonadIODef[T]) SubscribeOn(h *HandlerDef) *MonadIODef[T]
- type NilTypeDef
- type Numeric
- type Ordered
- type OtherwisePatternDef
- type PMapOption
- type Pattern
- type PatternMatching
- type Predicate
- type PredicateErr
- type ProductType
- type PublisherDef
- func (publisherSelf *PublisherDef[T]) Map(fn func(T) T) *PublisherDef[T]
- func (publisherSelf *PublisherDef[T]) New() *PublisherDef[interface{}]
- func (publisherSelf *PublisherDef[T]) Publish(result T)
- func (publisherSelf *PublisherDef[T]) Subscribe(sub Subscription[T]) *Subscription[T]
- func (publisherSelf *PublisherDef[T]) SubscribeOn(h *HandlerDef) *PublisherDef[T]
- func (publisherSelf *PublisherDef[T]) Unsubscribe(s *Subscription[T])
- type Queue
- type ReducerFunctor
- type RegexPatternDef
- type SetDef
- type SetForInterfaceDef
- func (setSelf *SetForInterfaceDef) Add(input ...interface{}) *SetForInterfaceDef
- func (setSelf *SetForInterfaceDef) Clone() *SetForInterfaceDef
- func (setSelf *SetForInterfaceDef) ContainsKey(input interface{}) bool
- func (setSelf *SetForInterfaceDef) ContainsValue(input interface{}) bool
- func (setSelf *SetForInterfaceDef) Get(key interface{}) interface{}
- func (setSelf *SetForInterfaceDef) Intersection(input *SetForInterfaceDef) *SetForInterfaceDef
- func (setSelf *SetForInterfaceDef) IsSubsetByKey(input *SetForInterfaceDef) bool
- func (setSelf *SetForInterfaceDef) IsSupersetByKey(input *SetForInterfaceDef) bool
- func (setSelf *SetForInterfaceDef) Keys() []interface{}
- func (setSelf *SetForInterfaceDef) MapKey(fn TransformerFunctor[interface{}, interface{}]) *SetForInterfaceDef
- func (setSelf *SetForInterfaceDef) MapValue(fn TransformerFunctor[interface{}, interface{}]) *SetForInterfaceDef
- func (setSelf *SetForInterfaceDef) Minus(input *SetForInterfaceDef) *SetForInterfaceDef
- func (setSelf *SetForInterfaceDef) RemoveKeys(input ...interface{}) *SetForInterfaceDef
- func (setSelf *SetForInterfaceDef) RemoveValues(input ...interface{}) *SetForInterfaceDef
- func (setSelf *SetForInterfaceDef) Set(key interface{}, value interface{})
- func (setSelf *SetForInterfaceDef) Size() int
- func (setSelf *SetForInterfaceDef) Union(input *SetForInterfaceDef) *SetForInterfaceDef
- func (setSelf *SetForInterfaceDef) Values() []interface{}
- type SimpleSortDescriptor
- type SortDescriptor
- type SortDescriptorsBuilder
- func (builder SortDescriptorsBuilder[T]) GetSortDescriptors() []SortDescriptor[T]
- func (builder SortDescriptorsBuilder[T]) Sort(input []T)
- func (builder SortDescriptorsBuilder[T]) ThenWith(input ...SortDescriptor[T]) SortDescriptorsBuilder[T]
- func (builder SortDescriptorsBuilder[T]) ThenWithFieldName(fieldName string, ascending bool) SortDescriptorsBuilder[T]
- func (builder SortDescriptorsBuilder[T]) ThenWithTransformerFunctor(transformFn TransformerFunctor[T, Comparable[interface{}]], ascending bool) SortDescriptorsBuilder[T]
- func (builder SortDescriptorsBuilder[T]) ToSortedList(input ...T) []T
- type Stack
- type StreamDef
- func (streamSelf *StreamDef[T]) Append(item ...T) *StreamDef[T]
- func (streamSelf *StreamDef[T]) Clone() *StreamDef[T]
- func (streamSelf *StreamDef[T]) Concat(slices ...[]T) *StreamDef[T]
- func (streamSelf *StreamDef[T]) Contains(input T) bool
- func (streamSelf *StreamDef[T]) Distinct() *StreamDef[T]
- func (streamSelf *StreamDef[T]) Extend(streams ...*StreamDef[T]) *StreamDef[T]
- func (streamSelf *StreamDef[T]) Filter(fn func(T, int) bool) *StreamDef[T]
- func (streamSelf *StreamDef[T]) FilterNotNil() *StreamDef[T]
- func (streamSelf *StreamDef[T]) Get(i int) T
- func (streamSelf *StreamDef[T]) Intersection(input *StreamDef[T]) *StreamDef[T]
- func (streamSelf *StreamDef[T]) IsSubset(input *StreamDef[T]) bool
- func (streamSelf *StreamDef[T]) IsSuperset(input *StreamDef[T]) bool
- func (streamSelf *StreamDef[T]) Len() int
- func (streamSelf *StreamDef[T]) Map(fn func(T, int) T) *StreamDef[T]
- func (streamSelf *StreamDef[T]) Minus(input *StreamDef[T]) *StreamDef[T]
- func (streamSelf *StreamDef[T]) Reject(fn func(T, int) bool) *StreamDef[T]
- func (streamSelf *StreamDef[T]) Remove(index int) *StreamDef[T]
- func (streamSelf *StreamDef[T]) RemoveItem(input ...T) *StreamDef[T]
- func (streamSelf *StreamDef[T]) Reverse() *StreamDef[T]
- func (streamSelf *StreamDef[T]) Sort(fn Comparator[T]) *StreamDef[T]
- func (streamSelf *StreamDef[T]) SortByIndex(fn func(a, b int) bool) *StreamDef[T]
- func (streamSelf *StreamDef[T]) ToArray() []T
- type StreamForInterfaceDef
- func (streamSelf *StreamForInterfaceDef) Append(item ...interface{}) *StreamForInterfaceDef
- func (streamSelf *StreamForInterfaceDef) Clone() *StreamForInterfaceDef
- func (streamSelf *StreamForInterfaceDef) Concat(slices ...[]interface{}) *StreamForInterfaceDef
- func (streamSelf *StreamForInterfaceDef) Contains(input interface{}) bool
- func (streamSelf *StreamForInterfaceDef) Distinct() *StreamForInterfaceDef
- func (streamSelf *StreamForInterfaceDef) Extend(streams ...*StreamForInterfaceDef) *StreamForInterfaceDef
- func (streamSelf *StreamForInterfaceDef) Filter(fn func(interface{}, int) bool) *StreamForInterfaceDef
- func (streamSelf *StreamForInterfaceDef) FilterNotNil() *StreamForInterfaceDef
- func (streamSelf *StreamForInterfaceDef) From(list ...interface{}) *StreamForInterfaceDef
- func (streamSelf *StreamForInterfaceDef) FromArray(list []interface{}) *StreamForInterfaceDef
- func (streamSelf *StreamForInterfaceDef) FromArrayBool(old []bool) *StreamForInterfaceDef
- func (streamSelf *StreamForInterfaceDef) FromArrayByte(old []byte) *StreamForInterfaceDef
- func (streamSelf *StreamForInterfaceDef) FromArrayFloat32(old []float32) *StreamForInterfaceDef
- func (streamSelf *StreamForInterfaceDef) FromArrayFloat64(old []float64) *StreamForInterfaceDef
- func (streamSelf *StreamForInterfaceDef) FromArrayInt(old []int) *StreamForInterfaceDef
- func (streamSelf *StreamForInterfaceDef) FromArrayInt16(old []int16) *StreamForInterfaceDef
- func (streamSelf *StreamForInterfaceDef) FromArrayInt32(old []int32) *StreamForInterfaceDef
- func (streamSelf *StreamForInterfaceDef) FromArrayInt64(old []int64) *StreamForInterfaceDef
- func (streamSelf *StreamForInterfaceDef) FromArrayInt8(old []int8) *StreamForInterfaceDef
- func (streamSelf *StreamForInterfaceDef) FromArrayMaybe(old []MaybeDef[interface{}]) *StreamForInterfaceDef
- func (streamSelf *StreamForInterfaceDef) FromArrayString(old []string) *StreamForInterfaceDef
- func (streamSelf *StreamForInterfaceDef) Get(i int) interface{}
- func (streamSelf *StreamForInterfaceDef) Intersection(input *StreamForInterfaceDef) *StreamForInterfaceDef
- func (streamSelf *StreamForInterfaceDef) IsSubset(input *StreamForInterfaceDef) bool
- func (streamSelf *StreamForInterfaceDef) IsSuperset(input *StreamForInterfaceDef) bool
- func (streamSelf *StreamForInterfaceDef) Len() int
- func (streamSelf *StreamForInterfaceDef) Map(fn func(interface{}, int) interface{}) *StreamForInterfaceDef
- func (streamSelf *StreamForInterfaceDef) Minus(input *StreamForInterfaceDef) *StreamForInterfaceDef
- func (streamSelf *StreamForInterfaceDef) Reject(fn func(interface{}, int) bool) *StreamForInterfaceDef
- func (streamSelf *StreamForInterfaceDef) Remove(index int) *StreamForInterfaceDef
- func (streamSelf *StreamForInterfaceDef) RemoveItem(input ...interface{}) *StreamForInterfaceDef
- func (streamSelf *StreamForInterfaceDef) Reverse() *StreamForInterfaceDef
- func (streamSelf *StreamForInterfaceDef) Sort(fn Comparator[interface{}]) *StreamForInterfaceDef
- func (streamSelf *StreamForInterfaceDef) SortByIndex(fn func(a, b int) bool) *StreamForInterfaceDef
- func (streamSelf *StreamForInterfaceDef) ToArray() []interface{}
- type StreamSetDef
- func NewStreamSet[T comparable, R comparable]() *StreamSetDef[T, R]
- func StreamSetFrom[T comparable, R comparable](list ...T) *StreamSetDef[T, R]
- func StreamSetFromArray[T comparable, R comparable](list []T) *StreamSetDef[T, R]
- func StreamSetFromMap[T comparable, R comparable](theMap map[T]*StreamDef[R]) *StreamSetDef[T, R]
- func (streamSetSelf *StreamSetDef[T, R]) Clone() *StreamSetDef[T, R]
- func (streamSetSelf *StreamSetDef[T, R]) Intersection(input *StreamSetDef[T, R]) *StreamSetDef[T, R]
- func (streamSetSelf *StreamSetDef[T, R]) MinusStreams(input *StreamSetDef[T, R]) *StreamSetDef[T, R]
- func (streamSetSelf *StreamSetDef[T, R]) Union(input *StreamSetDef[T, R]) *StreamSetDef[T, R]
- type StreamSetForInterfaceDef
- func NewStreamSetForInterface() *StreamSetForInterfaceDef
- func StreamSetForInterfaceFrom(list ...interface{}) *StreamSetForInterfaceDef
- func StreamSetForInterfaceFromArray(list []interface{}) *StreamSetForInterfaceDef
- func StreamSetForInterfaceFromMap(theMap map[interface{}]*StreamForInterfaceDef) *StreamSetForInterfaceDef
- func StreamSetFromArrayInterface(list []interface{}) *StreamSetForInterfaceDef
- func StreamSetFromInterface(list ...interface{}) *StreamSetForInterfaceDef
- func (streamSetSelf *StreamSetForInterfaceDef) Clone() *StreamSetForInterfaceDef
- func (streamSetSelf *StreamSetForInterfaceDef) Intersection(input *StreamSetForInterfaceDef) *StreamSetForInterfaceDef
- func (streamSetSelf *StreamSetForInterfaceDef) IsSubsetByKey(input *StreamSetForInterfaceDef) bool
- func (streamSetSelf *StreamSetForInterfaceDef) IsSupersetByKey(input *StreamSetForInterfaceDef) bool
- func (streamSetSelf *StreamSetForInterfaceDef) Minus(input *StreamSetForInterfaceDef) *StreamSetForInterfaceDef
- func (streamSetSelf *StreamSetForInterfaceDef) MinusStreams(input *StreamSetForInterfaceDef) *StreamSetForInterfaceDef
- func (streamSetSelf *StreamSetForInterfaceDef) Union(input *StreamSetForInterfaceDef) *StreamSetForInterfaceDef
- type Subscription
- type SumType
- type Transformer
- type TransformerFunctor
Constants ¶
This section is empty.
Variables ¶
var ( // ErrConversionUnsupported Conversion Unsupported ErrConversionUnsupported = errors.New("unsupported") // ErrConversionNil Conversion Nil ErrConversionNil = errors.New("<nil>") // ErrConversionNil Conversion Size Overflow ErrConversionSizeOverflow = errors.New("size overflow") )
var ( // ErrQueueIsEmpty Queue Is Empty ErrQueueIsEmpty = errors.New("queue is empty") // ErrQueueIsFull Queue Is Full ErrQueueIsFull = errors.New("queue is full") // ErrQueueIsClosed Queue Is Closed ErrQueueIsClosed = errors.New("queue is closed") // ErrQueueTakeTimeout Queue Take Timeout ErrQueueTakeTimeout = errors.New("queue take timeout") // ErrQueuePutTimeout Queue Put Timeout ErrQueuePutTimeout = errors.New("queue put timeout") // ErrStackIsEmpty Stack Is Empty ErrStackIsEmpty = errors.New("stack is empty") // ErrStackIsFull Stack Is Full ErrStackIsFull = errors.New("stack is full") )
var ErrActorAskTimeout = fmt.Errorf("ErrActorAskTimeout")
var Maybe someDef[interface{}]
Maybe Maybe utils instance
var None = noneDef{someDef[any]{/* contains filtered or unexported fields */}}
None None utils instance
Functions ¶
func CompareToOrdered ¶
CompareToOrdered A general Compare function for Ordered
func Compose ¶
func Compose[T any](fnList ...func(...T) []T) func(...T) []T
Compose Compose the functions from right to left (Math: f(g(x)) Compose: Compose(f, g)(x))
func ComposeInterface ¶
func ComposeInterface(fnList ...func(...interface{}) []interface{}) func(...interface{}) []interface{}
ComposeInterface Compose the functions from right to left (Math: f(g(x)) Compose: Compose(f, g)(x))
func CurryParam1 ¶
CurryParam1 Curry for 1 Param (for currying general fp functions simply)
func CurryParam1ForSlice1 ¶
CurryParam1ForSlice1 Curry for 1 Param (for currying general fp functions simply)
func CurryParam2 ¶
CurryParam2 Curry for 2 Params (for currying general fp functions simply)
func CurryParam3 ¶
func CurryParam3[T any, R any, A any, B any, C any](fn func(A, B, C, ...T) R, a A, b B, c C) func(...T) R
CurryParam3 Curry for 3 Params (for currying general fp functions simply)
func CurryParam4 ¶
func CurryParam4[T any, R any, A any, B any, C any, D any](fn func(A, B, C, D, ...T) R, a A, b B, c C, d D) func(...T) R
CurryParam4 Curry for 4 Params (for currying general fp functions simply)
func CurryParam5 ¶
func CurryParam5[T any, R any, A any, B any, C any, D any, E any](fn func(A, B, C, D, E, ...T) R, a A, b B, c C, d D, e E) func(...T) R
CurryParam5 Curry for 5 Params (for currying general fp functions simply)
func CurryParam6 ¶
func CurryParam6[T any, R any, A any, B any, C any, D any, E any, F any](fn func(A, B, C, D, E, F, ...T) R, a A, b B, c C, d D, e E, f F) func(...T) R
CurryParam6 Curry for 6 Params (for currying general fp functions simply)
func Dedupe ¶
func Dedupe[T comparable](list ...T) []T
Dedupe Returns a new list removing consecutive duplicates in list.
func Difference ¶
func Difference[T comparable](arrList ...[]T) []T
Difference returns a set that is the first set without elements of the remaining sets repeated value within list parameter will be ignored
func Distinct ¶
func Distinct[T comparable](list ...T) []T
Distinct removes duplicates.
Example
list := []int{8, 2, 8, 0, 2, 0} Distinct(list...) // returns [8, 2, 0]
func DistinctForInterface ¶
func DistinctForInterface(list ...interface{}) []interface{}
DistinctForInterface removes duplicates.
Example
list := []interface{}{8, 2, 8, 0, 2, 0} DistinctForInterface(list...) // returns [8, 2, 0]
func DistinctRandom ¶
func DistinctRandom[T comparable](list ...T) []T
DistinctRandom removes duplicates.(RandomOrder)
func Drop ¶
Drop drops N item(s) from the list and returns new list. Returns empty list if there is only one item in the list or list empty
func DropEq ¶
func DropEq[T comparable](num T, list ...T) []T
DropEq returns a new list after dropping the given item
Example:
DropEq(1, 1, 2, 3, 1) // returns [2, 3]
func DropLast ¶
DropLast drops last N item(s) from the list and returns new list. Returns empty list if there is only one item in the list or list empty
func DropWhile ¶
DropWhile drops the items from the list as long as condition satisfies.
Takes two inputs
- Function: takes one input and returns boolean
- list
Returns:
New List. Empty list if either one of arguments or both of them are nil
Example: Drops even number. Returns the remaining items once odd number is found in the list.
DropWhile(isEven, 4, 2, 3, 4, 5) // Returns [3, 4, 5] func isEven(num int) bool { return num%2 == 0 }
func DuplicateMap ¶
func DuplicateMap[T comparable, R any](input map[T]R) map[T]R
DuplicateMap Return a new Map
func DuplicateMapForInterface ¶
func DuplicateMapForInterface[R any](input map[interface{}]R) map[interface{}]R
DuplicateMapForInterface Return a new Map
func Either ¶
func Either(value interface{}, patterns ...Pattern) interface{}
Either Match Pattern list and return the effect() result of the matching Pattern
func Every ¶
Every returns true if supplied function returns logical true for every item in the list
Example:
Every(even, 8, 2, 10, 4) // Returns true func isEven(num int) bool { return num%2 == 0 }
Every(even) // Returns false Every(nil) // Returns false
func Exists ¶
func Exists[T comparable](input T, list ...T) bool
Exists checks if given item exists in the list
Example:
Exists(8, 8, 2, 10, 4) // Returns true Exists(8) // Returns false
func ExistsForInterface ¶
func ExistsForInterface(input interface{}, list ...interface{}) bool
ExistsForInterface checks if given item exists in the list
Example:
ExistsForInterface(8, 8, 2, 10, 4) // Returns true ExistsForInterface(8) // Returns false
func Flatten ¶
func Flatten[T any](list ...[]T) []T
Flatten creates a new slice where one level of nested elements are unnested
func GroupBy ¶
func GroupBy[T any, R comparable](grouper TransformerFunctor[T, R], list ...T) map[R][]T
GroupBy creates a map where the key is a group identifier and the value is a slice with the elements that have the same identifer
func Intersection ¶
func Intersection[T comparable](inputList ...[]T) []T
Intersection return a set that is the intersection of the input sets repeated value within list parameter will be ignored
func IntersectionForInterface ¶
func IntersectionForInterface(inputList ...[]interface{}) []interface{}
IntersectionForInterface return a set that is the intersection of the input sets repeated value within list parameter will be ignored
func IntersectionMapByKey ¶
func IntersectionMapByKey[T comparable, R any](inputList ...map[T]R) map[T]R
IntersectionMapByKey return a set that is the intersection of the input sets
func IntersectionMapByKeyForInterface ¶
func IntersectionMapByKeyForInterface[R any](inputList ...map[interface{}]R) map[interface{}]R
IntersectionMapByKeyForInterface return a set that is the intersection of the input sets
func IsDistinct ¶
func IsDistinct[T comparable](list ...T) bool
IsDistinct returns true if no two of the arguments are =
func IsEqual ¶
func IsEqual[T comparable](list1, list2 []T) bool
IsEqual Returns true if both list are equal else returns false
func IsEqualMap ¶
func IsEqualMap[T comparable, R comparable](map1, map2 map[T]R) bool
IsEqualMap Returns true if both maps are equal else returns false
func IsSubset ¶
func IsSubset[T comparable](list1, list2 []T) bool
IsSubset returns true or false by checking if set1 is a subset of set2 repeated value within list parameter will be ignored
func IsSubsetForInterface ¶
func IsSubsetForInterface(list1, list2 []interface{}) bool
IsSubsetForInterface returns true or false by checking if set1 is a subset of set2 repeated value within list parameter will be ignored
func IsSubsetMapByKey ¶
func IsSubsetMapByKey[T comparable, R any](item1, item2 map[T]R) bool
IsSubsetMapByKey returns true or false by checking if set1 is a subset of set2
func IsSubsetMapByKeyForInterface ¶
IsSubsetMapByKeyForInterface returns true or false by checking if set1 is a subset of set2
func IsSuperset ¶
func IsSuperset[T comparable](list1, list2 []T) bool
IsSuperset returns true or false by checking if set1 is a superset of set2 repeated value within list parameter will be ignored
func IsSupersetForInterface ¶
func IsSupersetForInterface(list1, list2 []interface{}) bool
IsSupersetForInterface returns true or false by checking if set1 is a superset of set2 repeated value within list parameter will be ignored
func IsSupersetMapByKey ¶
func IsSupersetMapByKey[T comparable, R any](item1, item2 map[T]R) bool
IsSupersetMapByKey returns true or false by checking if set1 is a superset of set2
func IsSupersetMapByKeyForInterface ¶
IsSupersetMapByKeyForInterface returns true or false by checking if set1 is a superset of set2
func KeysForInterface ¶
func KeysForInterface[R any](m map[interface{}]R) []interface{}
KeysForInterface returns a slice of map's keys
func MakeNumericReturnForParam1ReturnBool1 ¶
MakeNumericReturnForParam1ReturnBool1 Make Numeric 1 bool Return (for compose() general fp functions simply)
func MakeNumericReturnForSliceParamReturnBool1 ¶
MakeNumericReturnForSliceParamReturnBool1 Make Numeric 1 bool Return (for compose() general fp functions simply)
func MakeNumericReturnForVariadicParamReturnBool1 ¶
func MakeNumericReturnForVariadicParamReturnBool1[T any, R Numeric](fn func(...T) bool) func(...T) []R
MakeNumericReturnForVariadicParamReturnBool1 Make Numeric 1 bool Return (for compose() general fp functions simply)
func MakeVariadicParam1 ¶
MakeVariadicParam1 MakeVariadic for 1 Param (for compose() general fp functions simply)
func MakeVariadicParam2 ¶
MakeVariadicParam2 MakeVariadic for 2 Params (for compose() general fp functions simply)
func MakeVariadicParam3 ¶
MakeVariadicParam3 MakeVariadic for 3 Params (for compose() general fp functions simply)
func MakeVariadicParam4 ¶
MakeVariadicParam4 MakeVariadic for 4 Params (for compose() general fp functions simply)
func MakeVariadicParam5 ¶
MakeVariadicParam5 MakeVariadic for 5 Params (for compose() general fp functions simply)
func MakeVariadicParam6 ¶
MakeVariadicParam6 MakeVariadic for 6 Params (for compose() general fp functions simply)
func MakeVariadicReturn1 ¶
MakeVariadicReturn1 MakeVariadic for 1 Return value (for compose() general fp functions simply)
func MakeVariadicReturn2 ¶
MakeVariadicReturn2 MakeVariadic for 2 Return values (for compose() general fp functions simply)
func MakeVariadicReturn3 ¶
MakeVariadicReturn3 MakeVariadic for 3 Return values (for compose() general fp functions simply)
func MakeVariadicReturn4 ¶
MakeVariadicReturn4 MakeVariadic for 4 Return values (for compose() general fp functions simply)
func MakeVariadicReturn5 ¶
MakeVariadicReturn5 MakeVariadic for 5 Return values (for compose() general fp functions simply)
func MakeVariadicReturn6 ¶
MakeVariadicReturn6 MakeVariadic for 6 Return values (for compose() general fp functions simply)
func Map ¶
func Map[T any, R any](fn TransformerFunctor[T, R], values ...T) []R
Map Map the values to the function from left to right
func MapIndexed ¶
MapIndexed Map the values to the function from left to right
func MatchCompType ¶
MatchCompType Check does the Composite Data match the given SumType
func MatchCompTypeRef ¶
MatchCompTypeRef Check does the Composite Data match the given SumType
func Max ¶
func Max[T Numeric](list ...T) T
Max returns max item from the list. Return 0 if the list is either empty or nil
func Merge ¶
func Merge[T comparable, R any](map1, map2 map[T]R) map[T]R
Merge takes two inputs: map[T]R and map[T]R and merge two maps and returns a new map[T]R.
func MergeForInterface ¶
func MergeForInterface[R any](map1, map2 map[interface{}]R) map[interface{}]R
MergeForInterface takes two inputs: map[T]R and map[T]R and merge two maps and returns a new map[T]R.
func Min ¶
func Min[T Numeric](list ...T) T
Min returns min item from the list. Return 0 if the list is either empty or nil
func MinMax ¶
func MinMax[T Numeric](list ...T) (T, T)
MinMax returns min and max items from the list. Return 0,0 if the list is either empty or nil
func MinusForInterface ¶
func MinusForInterface(set1, set2 []interface{}) []interface{}
MinusForInterface all of set1 but not in set2
func MinusMapByKey ¶
func MinusMapByKey[T comparable, R any](set1, set2 map[T]R) map[T]R
MinusMapByKey all of set1 but not in set2
func PMap ¶
func PMap[T any, R any](f TransformerFunctor[T, R], option *PMapOption, list ...T) []R
PMap applies the function(1st argument) on each item in the list and returns a new list.
Order of new list is guaranteed. This feature can be disabled by passing: PMapOption{RandomOrder: true} to gain performance Run in parallel. no_of_goroutines = no_of_items_in_list or 3rd argument can be passed to fix the number of goroutines.
Takes 3 inputs. 3rd argument is option
- Function - takes 1 input
- optional argument - PMapOption{FixedPool: <some_number>}
- List
func Partition ¶
Partition splits elements into two groups - one where the predicate is satisfied and one where the predicate is not
func Pipe ¶
func Pipe[T any](fnList ...func(...T) []T) func(...T) []T
Pipe Pipe the functions from left to right
func PipeInterface ¶
func PipeInterface(fnList ...func(...interface{}) []interface{}) func(...interface{}) []interface{}
PipeInterface Pipe the functions from left to right
func Prepend ¶
func Prepend[T any](element T, list []T) []T
Prepend returns the slice with the additional element added to the beginning
func Range ¶
func Range[T Numeric](lower, higher T, hops ...T) []T
Range returns a list of range between lower and upper value
Takes 3 inputs
- lower limit
- Upper limit
- Hops (optional)
Returns
List of range between lower and upper value Empty list if 3rd argument is either 0 or negative number
Example:
Range(-2, 2) // Returns: [-2, -1, 0, 1] Range(0, 2) // Returns: [0, 1] Range(3, 7, 2) // Returns: [3, 5]
func Reduce ¶
func Reduce[T any, R any](fn ReducerFunctor[T, R], memo R, input ...T) R
Reduce Reduce the values from left to right(func(memo,val), starting value, slice)
func ReduceIndexed ¶
ReduceIndexed Reduce the values from left to right(func(memo,val,index), starting value, slice)
func SliceToMap ¶
func SliceToMap[T comparable, R any](defaultValue R, input ...T) map[T]R
SliceToMap Return Slice of varargs
func SliceToMapForInterface ¶
func SliceToMapForInterface[R any](defaultValue R, input ...interface{}) map[interface{}]R
SliceToMapForInterface Return Slice of varargs
func Some ¶
Some finds item in the list based on supplied function.
Takes 2 input:
- Function
- List
Returns:
bool. True if condition satisfies, else false
Example:
Some(isEven, 8, 2, 10, 4) // Returns true Some(isEven, 1, 3, 5, 7) // Returns false Some(nil) // Returns false func isEven(num int) bool { return num%2 == 0 }
func SortBySortDescriptors ¶
func SortBySortDescriptors[T any](sortDescriptors []SortDescriptor[T], input []T)
SortBySortDescriptors Sort items by sortDescriptors
func SortOrdered ¶
SortOrdered Sort items by Comparator
func SortOrderedAscending ¶
func SortOrderedAscending[T Ordered](input ...T) []T
SortOrderedAscending Sort items by Comparator
func SortOrderedDescending ¶
func SortOrderedDescending[T Ordered](input ...T) []T
SortOrderedDescending Sort items by Comparator
func SortSlice ¶
func SortSlice[T any](fn Comparator[T], input ...T) []T
SortSlice Sort items by Comparator
func SortedListBySortDescriptors ¶
func SortedListBySortDescriptors[T any](sortDescriptors []SortDescriptor[T], input ...T) []T
SortedListBySortDescriptors Sort items by sortDescriptors and return value
func SplitEvery ¶
SplitEvery returns elements in equal length slices
func Tail ¶
func Tail[T any](list ...T) []T
Tail returns the input slice with all elements except the first element
func Trampoline ¶
Trampoline Trampoline
func Union ¶
func Union[T comparable](arrList ...[]T) []T
Union return a set that is the union of the input sets repeated value within list parameter will be ignored
func UniqBy ¶
func UniqBy[T any, R comparable](identify TransformerFunctor[T, R], list ...T) []T
UniqBy returns a slice of only unique values based on a comparable identifier
func Values ¶
func Values[T comparable, R any](m map[T]R) []R
Values returns a slice of map's values
func ValuesForInterface ¶
func ValuesForInterface[R any](m map[interface{}]R) []R
ValuesForInterface returns a slice of map's values
func Zip ¶
func Zip[T comparable, R any](list1 []T, list2 []R) map[T]R
Zip takes two inputs: first list of type: []T, second list of type: []T. Then it merges two list and returns a new map of type: map[T]R
Types ¶
type ActorDef ¶
type ActorDef[T any] struct { // contains filtered or unexported fields }
ActorDef[T] Actor model inspired by Erlang/Akka
var Actor ActorDef[interface{}]
Actor Actor utils instance
func ActorNewByOptionsGenerics ¶
func ActorNewByOptionsGenerics[T any](effect func(*ActorDef[T], T), ioCh chan T, context map[string]interface{}) *ActorDef[T]
ActorNewByOptionsGenerics New Actor by its options
func ActorNewGenerics ¶
ActorNewGenerics New Actor instance
func (*ActorDef[T]) GetDefault ¶
GetDefault Get Default Actor
func (*ActorDef[T]) NewByOptions ¶
func (actorSelf *ActorDef[T]) NewByOptions(effect func(*ActorDef[T], T), ioCh chan T, context map[string]interface{}) *ActorDef[T]
NewByOptions New Actor by its options
type ActorHandle ¶
type ActorHandle[T any] interface { Send(message T) }
ActorHandle A target could send messages
type AskDef ¶
AskDef[T, R] Ask inspired by Erlang/Akka
var Ask AskDef[interface{}, interface{}]
Ask Ask utils instance
func AskNewByOptionsGenerics ¶
AskNewByOptionsGenerics New Ask by its options
func AskNewGenerics ¶
AskNewGenerics New Ask instance
func (*AskDef[T, R]) AskChannel ¶
func (askSelf *AskDef[T, R]) AskChannel(target ActorHandle[interface{}]) chan R
AskChannel Sender Ask
func (*AskDef[T, R]) AskOnce ¶
func (askSelf *AskDef[T, R]) AskOnce(target ActorHandle[interface{}]) R
AskOnce Sender Ask
func (*AskDef[T, R]) AskOnceWithTimeout ¶ added in v2.2.4
func (askSelf *AskDef[T, R]) AskOnceWithTimeout(target ActorHandle[interface{}], timeout time.Duration) (R, error)
AskOnceWithTimeout Sender Ask with timeout
func (*AskDef[T, R]) NewByOptions ¶
NewByOptions New Ask by its options
type AtomBool ¶
type AtomBool struct {
// contains filtered or unexported fields
}
AtomBool Atomic Bool
type BufferedChannelQueue ¶ added in v2.2.0
type BufferedChannelQueue[T any] struct { // contains filtered or unexported fields }
BufferedChannelQueue BlockingQueue with ChannelQueue & scalable pool, inspired by Collection utils
func NewBufferedChannelQueue ¶ added in v2.2.0
func NewBufferedChannelQueue[T any](channelCapacity int, bufferSizeMaximum int, nodeHookPoolSize int) *BufferedChannelQueue[T]
NewBufferedChannelQueue New BufferedChannelQueue instance from a Queue[T]
func (*BufferedChannelQueue[T]) Close ¶ added in v2.2.0
func (q *BufferedChannelQueue[T]) Close()
Close Close the BufferedChannelQueue
func (*BufferedChannelQueue[T]) Count ¶ added in v2.2.7
func (q *BufferedChannelQueue[T]) Count() int
Count Count items
func (*BufferedChannelQueue[T]) GetBufferSizeMaximum ¶ added in v2.2.5
func (q *BufferedChannelQueue[T]) GetBufferSizeMaximum() int
GetBufferSizeMaximum Get MaximumBufferSize(maximum number of buffered items outside the ChannelQueue)
func (*BufferedChannelQueue[T]) GetChannel ¶ added in v2.2.7
func (q *BufferedChannelQueue[T]) GetChannel() chan T
GetChannel Get Channel(for Selecting channels usages)
func (*BufferedChannelQueue[T]) GetFreeNodeHookPoolIntervalDuration ¶ added in v2.2.5
func (q *BufferedChannelQueue[T]) GetFreeNodeHookPoolIntervalDuration() time.Duration
GetFreeNodeHookPoolIntervalDuration Get freeNodeHookPoolIntervalDuration(the interval to clear buffering node hooks down to nodeHookPoolSize)
func (*BufferedChannelQueue[T]) GetLoadFromPoolDuration ¶ added in v2.2.5
func (q *BufferedChannelQueue[T]) GetLoadFromPoolDuration() time.Duration
GetLoadFromPoolDuration Get loadFromPoolDuration(the interval to take buffered items into the ChannelQueue)
func (*BufferedChannelQueue[T]) GetNodeHookPoolSize ¶ added in v2.2.5
func (q *BufferedChannelQueue[T]) GetNodeHookPoolSize() int
GetNodeHookPoolSize Get nodeHookPoolSize(the buffering node hooks ideal size)
func (*BufferedChannelQueue[T]) IsClosed ¶ added in v2.2.5
func (q *BufferedChannelQueue[T]) IsClosed() bool
IsClosed Is the BufferedChannelQueue closed
func (*BufferedChannelQueue[T]) Offer ¶ added in v2.2.0
func (q *BufferedChannelQueue[T]) Offer(val T) error
Offer Offer the T val(non-blocking)
func (*BufferedChannelQueue[T]) Poll ¶ added in v2.2.0
func (q *BufferedChannelQueue[T]) Poll() (T, error)
Poll Poll the T val(non-blocking)
func (*BufferedChannelQueue[T]) Put ¶ added in v2.2.0
func (q *BufferedChannelQueue[T]) Put(val T) error
Put Put the T val(non-blocking)
func (*BufferedChannelQueue[T]) PutWithTimeout ¶ added in v2.3.4
func (q *BufferedChannelQueue[T]) PutWithTimeout(val T, timeout time.Duration) error
PutWithTimeout Put the T val(blocking), with timeout
func (*BufferedChannelQueue[T]) SetBufferSizeMaximum ¶ added in v2.2.0
func (q *BufferedChannelQueue[T]) SetBufferSizeMaximum(size int) *BufferedChannelQueue[T]
SetBufferSizeMaximum Set MaximumBufferSize(maximum number of buffered items outside the ChannelQueue)
func (*BufferedChannelQueue[T]) SetFreeNodeHookPoolIntervalDuration ¶ added in v2.2.0
func (q *BufferedChannelQueue[T]) SetFreeNodeHookPoolIntervalDuration(duration time.Duration) *BufferedChannelQueue[T]
SetFreeNodeHookPoolIntervalDuration Set freeNodeHookPoolIntervalDuration(the interval to clear buffering node hooks down to nodeHookPoolSize)
func (*BufferedChannelQueue[T]) SetLoadFromPoolDuration ¶ added in v2.2.0
func (q *BufferedChannelQueue[T]) SetLoadFromPoolDuration(duration time.Duration) *BufferedChannelQueue[T]
SetLoadFromPoolDuration Set loadFromPoolDuration(the interval to take buffered items into the ChannelQueue)
func (*BufferedChannelQueue[T]) SetNodeHookPoolSize ¶ added in v2.2.0
func (q *BufferedChannelQueue[T]) SetNodeHookPoolSize(size int) *BufferedChannelQueue[T]
SetNodeHookPoolSize Set nodeHookPoolSize(the buffering node hooks ideal size)
func (*BufferedChannelQueue[T]) Take ¶ added in v2.2.0
func (q *BufferedChannelQueue[T]) Take() (T, error)
Take Take the T val(blocking)
func (*BufferedChannelQueue[T]) TakeWithTimeout ¶ added in v2.2.0
func (q *BufferedChannelQueue[T]) TakeWithTimeout(timeout time.Duration) (T, error)
TakeWithTimeout Take the T val(blocking), with timeout
type ChannelQueue ¶ added in v2.2.0
type ChannelQueue[T any] chan T
ChannelQueue ChannelQueue inspired by Collection utils
func NewChannelQueue ¶ added in v2.2.0
func NewChannelQueue[T any](capacity int) ChannelQueue[T]
NewChannelQueue New ChannelQueue instance with capacity
func (ChannelQueue[T]) Offer ¶ added in v2.2.0
func (q ChannelQueue[T]) Offer(val T) error
Offer Offer the T val(non-blocking)
func (ChannelQueue[T]) Poll ¶ added in v2.2.0
func (q ChannelQueue[T]) Poll() (T, error)
Poll Poll the T val(non-blocking)
func (ChannelQueue[T]) Put ¶ added in v2.2.0
func (q ChannelQueue[T]) Put(val T) error
Put Put the T val(blocking)
func (ChannelQueue[T]) PutWithTimeout ¶ added in v2.2.0
func (q ChannelQueue[T]) PutWithTimeout(val T, timeout time.Duration) error
PutWithTimeout Put the T val(blocking), with timeout
func (ChannelQueue[T]) Take ¶ added in v2.2.0
func (q ChannelQueue[T]) Take() (T, error)
Take Take the T val(blocking)
func (ChannelQueue[T]) TakeWithTimeout ¶ added in v2.2.0
func (q ChannelQueue[T]) TakeWithTimeout(timeout time.Duration) (T, error)
TakeWithTimeout Take the T val(blocking), with timeout
type CompData ¶
type CompData struct {
// contains filtered or unexported fields
}
CompData Composite Data with values & its CompType(SumType)
func NewCompData ¶
NewCompData New SumType Data by its type and composite values
type CompType ¶
type CompType interface {
Matches(value ...interface{}) bool
}
CompType Abstract SumType concept interface
func DefProduct ¶
DefProduct Define the ProductType of a SumType
type CompTypePatternDef ¶
type CompTypePatternDef struct {
// contains filtered or unexported fields
}
CompTypePatternDef Pattern which matching when the SumType matches
func (CompTypePatternDef) Apply ¶
func (patternSelf CompTypePatternDef) Apply(value interface{}) interface{}
Apply Evaluate the result by its given effect function
func (CompTypePatternDef) Matches ¶
func (patternSelf CompTypePatternDef) Matches(value interface{}) bool
Matches Match the given value by the pattern
type Comparable ¶
Comparable Comparable interface able to be compared
type ComparableOrdered ¶
type ComparableOrdered[T Ordered] struct { Val T }
ComparableOrdered A Ordered Comparable for Comparator
func NewComparableOrdered ¶
func NewComparableOrdered[T Ordered](val T) ComparableOrdered[T]
NewComparableOrdered Generate a Ordered Comparable for Comparator
func (ComparableOrdered[T]) CompareTo ¶
func (obj ComparableOrdered[T]) CompareTo(input interface{}) int
CompareTo Compare with an another object
type ComparableString ¶
type ComparableString struct {
Val string
}
ComparableString A String Comparable for Comparator
func NewComparableString ¶
func NewComparableString(val string) ComparableString
NewComparableString Generate a String Comparable for Comparator
func (ComparableString) CompareTo ¶
func (obj ComparableString) CompareTo(input interface{}) int
CompareTo Compare with an another object
type ConcurrentQueue ¶ added in v2.2.0
type ConcurrentQueue[T any] struct { // contains filtered or unexported fields }
ConcurrentQueue ConcurrentQueue inspired by Collection utils
func NewConcurrentQueue ¶ added in v2.2.0
func NewConcurrentQueue[T any](queue Queue[T]) *ConcurrentQueue[T]
NewConcurrentQueue New ConcurrentQueue instance from a Queue[T]
func (*ConcurrentQueue[T]) Offer ¶ added in v2.2.0
func (q *ConcurrentQueue[T]) Offer(val T) error
Offer Offer the T val(non-blocking)
func (*ConcurrentQueue[T]) Poll ¶ added in v2.2.0
func (q *ConcurrentQueue[T]) Poll() (T, error)
Poll Poll the T val(non-blocking)
func (*ConcurrentQueue[T]) Put ¶ added in v2.2.0
func (q *ConcurrentQueue[T]) Put(val T) error
Put Put the T val(probably blocking)
func (*ConcurrentQueue[T]) Take ¶ added in v2.2.0
func (q *ConcurrentQueue[T]) Take() (T, error)
Take Take the T val(probably blocking)
type ConcurrentStack ¶ added in v2.2.3
type ConcurrentStack[T any] struct { // contains filtered or unexported fields }
ConcurrentStack ConcurrentStack inspired by Collection utils
func NewConcurrentStack ¶ added in v2.2.3
func NewConcurrentStack[T any](stack Stack[T]) *ConcurrentStack[T]
NewConcurrentStack New ConcurrentStack instance from a Stack[T]
func (*ConcurrentStack[T]) Pop ¶ added in v2.2.3
func (q *ConcurrentStack[T]) Pop() (T, error)
Take Take the T val(probably blocking)
func (*ConcurrentStack[T]) Push ¶ added in v2.2.3
func (q *ConcurrentStack[T]) Push(val T) error
Put Put the T val(probably blocking)
type CorDef ¶
type CorDef[T any] struct { // contains filtered or unexported fields }
CorDef Cor Coroutine inspired by Python/Ecmascript/Lua
var Cor CorDef[interface{}]
Cor Cor utils instance
func (*CorDef[T]) DoNotation ¶
DoNotation Do Notation by function (inspired by Haskell one)
func (*CorDef[T]) NewAndStart ¶
NewAndStart New a Cor instance and start it immediately
func (*CorDef[T]) StartWithVal ¶
func (corSelf *CorDef[T]) StartWithVal(in T)
StartWithVal Start the Cor with an initial value
func (*CorDef[T]) YieldFromIO ¶
func (corSelf *CorDef[T]) YieldFromIO(target *MonadIODef[T]) T
YieldFromIO Yield from a given MonadIO
type CorOp ¶
type CorOp[T any] struct { // contains filtered or unexported fields }
CorOp Cor Yield Operation/Delegation/Callback
type CurryDef ¶
CurryDef Curry inspired by Currying in Java ways
func CurryNew ¶
func CurryNew(fn func(c *CurryDef[interface{}, interface{}], args ...interface{}) interface{}) *CurryDef[interface{}, interface{}]
CurryNew New Curry instance by function
func CurryNewGenerics ¶
CurryNewGenerics New Curry instance by function
type DoublyListItem ¶ added in v2.2.0
type DoublyListItem[T any] struct { Next *DoublyListItem[T] Prev *DoublyListItem[T] Val *T }
DoublyListItem DoublyListItem inspired by Collection utils
func (*DoublyListItem[T]) AddFirst ¶ added in v2.2.0
func (listItem *DoublyListItem[T]) AddFirst(input *DoublyListItem[T]) *DoublyListItem[T]
AddFirst Add the input item to the first position
func (*DoublyListItem[T]) AddLast ¶ added in v2.2.0
func (listItem *DoublyListItem[T]) AddLast(input *DoublyListItem[T]) *DoublyListItem[T]
AddLast Add the input item to the last
func (*DoublyListItem[T]) Count ¶ added in v2.2.0
func (listItem *DoublyListItem[T]) Count() int
Count Count items
func (*DoublyListItem[T]) First ¶ added in v2.2.0
func (listItem *DoublyListItem[T]) First() *DoublyListItem[T]
First Get the First one
func (*DoublyListItem[T]) Last ¶ added in v2.2.0
func (listItem *DoublyListItem[T]) Last() *DoublyListItem[T]
Last Get the Last one
type EqualPatternDef ¶
type EqualPatternDef struct {
// contains filtered or unexported fields
}
EqualPatternDef Pattern which matching when the given object is equal to predefined one
func (EqualPatternDef) Apply ¶
func (patternSelf EqualPatternDef) Apply(value interface{}) interface{}
Apply Evaluate the result by its given effect function
func (EqualPatternDef) Matches ¶
func (patternSelf EqualPatternDef) Matches(value interface{}) bool
Matches Match the given value by the pattern
type FieldSortDescriptor ¶
type FieldSortDescriptor[T any] struct { SimpleSortDescriptor[T] // contains filtered or unexported fields }
FieldSortDescriptor FieldSortDescriptor implemented by Reflection(by FieldName)
func NewFieldSortDescriptor ¶
func NewFieldSortDescriptor[T any](fieldName string, ascending bool) FieldSortDescriptor[T]
NewFieldSortDescriptor Generate a new FieldSortDescriptor by FieldName & ascending(true)/descending(false)
func (FieldSortDescriptor[T]) GetFieldName ¶
func (descriptor FieldSortDescriptor[T]) GetFieldName() string
GetFieldName Get the fieldName to sort
func (FieldSortDescriptor[T]) SetFieldName ¶
func (descriptor FieldSortDescriptor[T]) SetFieldName(val string)
SetFieldName Set the fieldName to sort
func (FieldSortDescriptor[T]) TransformedBy ¶
func (descriptor FieldSortDescriptor[T]) TransformedBy() TransformerFunctor[T, Comparable[interface{}]]
TransformedBy Get the TransformerFunctor of this SortDescriptor
type HandlerDef ¶
type HandlerDef struct {
// contains filtered or unexported fields
}
HandlerDef Handler inspired by Android/WebWorker
var Handler HandlerDef
Handler Handler utils instance
func (*HandlerDef) GetDefault ¶
func (handlerSelf *HandlerDef) GetDefault() *HandlerDef
GetDefault Get Default Handler
func (*HandlerDef) NewByCh ¶
func (handlerSelf *HandlerDef) NewByCh(ioCh chan func()) *HandlerDef
NewByCh New Handler by its Channel
func (*HandlerDef) Post ¶
func (handlerSelf *HandlerDef) Post(fn func())
Post Post a function to execute on the Handler
type KindPatternDef ¶
type KindPatternDef struct {
// contains filtered or unexported fields
}
KindPatternDef Pattern which matching when the kind matches
func (KindPatternDef) Apply ¶
func (patternSelf KindPatternDef) Apply(value interface{}) interface{}
Apply Evaluate the result by its given effect function
func (KindPatternDef) Matches ¶
func (patternSelf KindPatternDef) Matches(value interface{}) bool
Matches Match the given value by the pattern
type LinkedListItem ¶ added in v2.2.0
type LinkedListItem[T any] struct { Next *LinkedListItem[T] Val *T }
LinkedListItem LinkedListItem inspired by Collection utils
func (*LinkedListItem[T]) AddLast ¶ added in v2.2.0
func (listItem *LinkedListItem[T]) AddLast(input *LinkedListItem[T]) *LinkedListItem[T]
AddLast Add the input item to the last
func (*LinkedListItem[T]) Count ¶ added in v2.2.0
func (listItem *LinkedListItem[T]) Count() int
Count Count items
func (*LinkedListItem[T]) Last ¶ added in v2.2.0
func (listItem *LinkedListItem[T]) Last() *LinkedListItem[T]
Last Get the Last one
type LinkedListQueue ¶ added in v2.2.0
type LinkedListQueue[T any] struct { // contains filtered or unexported fields }
LinkedListQueue LinkedListQueue inspired by Collection utils
func NewLinkedListQueue ¶ added in v2.2.0
func NewLinkedListQueue[T any]() *LinkedListQueue[T]
NewLinkedListQueue New LinkedListQueue instance
func (*LinkedListQueue[T]) Clear ¶ added in v2.2.0
func (q *LinkedListQueue[T]) Clear()
Clear Clear all data
func (*LinkedListQueue[T]) ClearNodePool ¶ added in v2.2.0
func (q *LinkedListQueue[T]) ClearNodePool()
ClearNodePool Clear cached LinkedListItem nodes in nodePool
func (*LinkedListQueue[T]) Count ¶ added in v2.2.0
func (q *LinkedListQueue[T]) Count() int
Count Count Items
func (*LinkedListQueue[T]) KeepNodePoolCount ¶ added in v2.2.0
func (q *LinkedListQueue[T]) KeepNodePoolCount(n int)
KeepNodePoolCount Decrease/Increase LinkedListItem nodes to n items
func (*LinkedListQueue[T]) Offer ¶ added in v2.2.0
func (q *LinkedListQueue[T]) Offer(val T) error
Offer Offer the T val to the last position(non-blocking)
func (*LinkedListQueue[T]) Peek ¶ added in v2.2.0
func (q *LinkedListQueue[T]) Peek() (T, error)
Peek Peek the T val from the first position without removing it (non-blocking)
func (*LinkedListQueue[T]) Poll ¶ added in v2.2.0
func (q *LinkedListQueue[T]) Poll() (T, error)
Poll Poll the T val from the first position(non-blocking)
func (*LinkedListQueue[T]) Pop ¶ added in v2.2.0
func (q *LinkedListQueue[T]) Pop() (T, error)
Pop Pop the data from the last position(non-blocking)
func (*LinkedListQueue[T]) Push ¶ added in v2.2.0
func (q *LinkedListQueue[T]) Push(val T) error
Push Push the data to the last position(non-blocking)
func (*LinkedListQueue[T]) Put ¶ added in v2.2.0
func (q *LinkedListQueue[T]) Put(val T) error
Put Put the T val to the last position(no-blocking)
func (*LinkedListQueue[T]) Shift ¶ added in v2.2.0
func (q *LinkedListQueue[T]) Shift() (T, error)
Shift Shift the T val from the first position (non-blocking)
func (*LinkedListQueue[T]) Take ¶ added in v2.2.0
func (q *LinkedListQueue[T]) Take() (T, error)
Take Take the T val from the first position(no-blocking)
func (*LinkedListQueue[T]) Unshift ¶ added in v2.2.0
func (q *LinkedListQueue[T]) Unshift(val T) error
Unshift Unshift the T val to the first position(non-blocking)
type MapSetDef ¶
type MapSetDef[T comparable, R comparable] map[T]R
MapSetDef Set inspired by Collection utils
func SetFrom ¶
func SetFrom[T comparable, R comparable](list ...T) *MapSetDef[T, R]
SetFrom New Set instance from a T array
func SetFromArray ¶
func SetFromArray[T comparable, R comparable](list []T) *MapSetDef[T, R]
SetFromArray New Set instance from a T array
func SetFromMap ¶
func SetFromMap[T comparable, R comparable](theMap map[T]R) *MapSetDef[T, R]
SetFromMap New Set instance from a map[T]R
func (*MapSetDef[T, R]) AsMap ¶
func (mapSetSelf *MapSetDef[T, R]) AsMap() map[T]R
AsMap Make Set an object typed as map[T] R
func (*MapSetDef[T, R]) ContainsKey ¶
ContainsKey Check the key exists or not in the Set
func (*MapSetDef[T, R]) ContainsValue ¶
ContainsValue Check the value exists or not in the Set
func (*MapSetDef[T, R]) Get ¶
func (mapSetSelf *MapSetDef[T, R]) Get(key T) R
Get Get items from the Set
func (*MapSetDef[T, R]) Intersection ¶
Intersection Get the Intersection with this Set and an another Set
func (*MapSetDef[T, R]) IsSubsetByKey ¶
IsSubsetByKey returns true or false by checking if set1 is a subset of set2
func (*MapSetDef[T, R]) IsSupersetByKey ¶
IsSupersetByKey returns true or false by checking if set1 is a superset of set2
func (*MapSetDef[T, R]) Keys ¶
func (mapSetSelf *MapSetDef[T, R]) Keys() []T
Keys Convert Set to slice
func (*MapSetDef[T, R]) MapKey ¶
func (mapSetSelf *MapSetDef[T, R]) MapKey(fn TransformerFunctor[T, T]) SetDef[T, R]
MapKey Map all keys of Set by function
func (*MapSetDef[T, R]) MapValue ¶
func (mapSetSelf *MapSetDef[T, R]) MapValue(fn TransformerFunctor[R, R]) SetDef[T, R]
MapValue Map all values of Set by function
func (*MapSetDef[T, R]) RemoveKeys ¶
RemoveKeys Remove keys from the Set
func (*MapSetDef[T, R]) RemoveValues ¶
RemoveValues Remove values from the Set
func (*MapSetDef[T, R]) Set ¶
func (mapSetSelf *MapSetDef[T, R]) Set(key T, value R)
Set Set items to the Set
type MaybeDef ¶
type MaybeDef[T any] interface { Just(in interface{}) MaybeDef[interface{}] Or(or T) T Clone() MaybeDef[T] FlatMap(fn func(T) MaybeDef[T]) MaybeDef[T] ToString() string ToPtr() *T ToMaybe() MaybeDef[T] ToFloat64() (float64, error) ToFloat32() (float32, error) ToInt() (int, error) ToInt32() (int32, error) ToInt64() (int64, error) ToBool() (bool, error) Let(fn func()) Unwrap() T UnwrapInterface() interface{} IsPresent() bool IsNil() bool IsValid() bool IsPtr() bool Type() reflect.Type Kind() reflect.Kind IsType(t reflect.Type) bool IsKind(t reflect.Kind) bool }
MaybeDef Maybe inspired by Rx/Optional/Guava/Haskell
func JustGenerics ¶
JustGenerics New Maybe by a given value
type MonadIODef ¶
type MonadIODef[T any] struct { // contains filtered or unexported fields }
MonadIODef MonadIO inspired by Rx/Observable
var MonadIO MonadIODef[interface{}]
MonadIO MonadIO utils instance
func MonadIOJustGenerics ¶
func MonadIOJustGenerics[T any](in T) *MonadIODef[T]
MonadIOJustGenerics New MonadIO by a given value
func MonadIONewGenerics ¶
func MonadIONewGenerics[T any](effect func() T) *MonadIODef[T]
MonadIONewGenerics New MonadIO by effect function
func (*MonadIODef[T]) Eval ¶
func (monadIOSelf *MonadIODef[T]) Eval() T
Eval Eval the value right now(sync)
func (*MonadIODef[T]) FlatMap ¶
func (monadIOSelf *MonadIODef[T]) FlatMap(fn func(T) *MonadIODef[T]) *MonadIODef[T]
FlatMap FlatMap the MonadIO by function
func (MonadIODef[T]) Just ¶
func (monadIOSelf MonadIODef[T]) Just(in interface{}) *MonadIODef[interface{}]
Just New MonadIO by a given value
func (*MonadIODef[T]) New ¶
func (monadIOSelf *MonadIODef[T]) New(effect func() T) *MonadIODef[T]
New New MonadIO by effect function
func (*MonadIODef[T]) ObserveOn ¶
func (monadIOSelf *MonadIODef[T]) ObserveOn(h *HandlerDef) *MonadIODef[T]
ObserveOn Observe the MonadIO on the specific Handler
func (*MonadIODef[T]) Subscribe ¶
func (monadIOSelf *MonadIODef[T]) Subscribe(s Subscription[T]) *Subscription[T]
Subscribe Subscribe the MonadIO by Subscription
func (*MonadIODef[T]) SubscribeOn ¶
func (monadIOSelf *MonadIODef[T]) SubscribeOn(h *HandlerDef) *MonadIODef[T]
SubscribeOn Subscribe the MonadIO on the specific Handler
type NilTypeDef ¶
type NilTypeDef struct{}
NilTypeDef NilType implemented by Nil determinations
var NilType NilTypeDef
NilType NilType CompType instance
func (NilTypeDef) Matches ¶
func (typeSelf NilTypeDef) Matches(value ...interface{}) bool
Matches Check does it match nil
type Numeric ¶
type Numeric interface { int | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | float32 | float64 }
Numeric Define Numeric types for Generics
type Ordered ¶
type Ordered interface { int | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | uintptr | string | float32 | float64 }
Ordered Define Ordered types for Generics
type OtherwisePatternDef ¶
type OtherwisePatternDef struct {
// contains filtered or unexported fields
}
OtherwisePatternDef Pattern which matching when the others didn't match(finally)
func (OtherwisePatternDef) Apply ¶
func (patternSelf OtherwisePatternDef) Apply(value interface{}) interface{}
Apply Evaluate the result by its given effect function
func (OtherwisePatternDef) Matches ¶
func (patternSelf OtherwisePatternDef) Matches(value interface{}) bool
Matches Match the given value by the pattern
type PMapOption ¶
PMapOption Options for PMap usages
type Pattern ¶
type Pattern interface { Matches(value interface{}) bool Apply(interface{}) interface{} }
Pattern Pattern general interface
func InCaseOfEqual ¶
func InCaseOfEqual(value interface{}, effect fnObj) Pattern
InCaseOfEqual In case of its value is equal to the given one
func InCaseOfKind ¶
InCaseOfKind In case of its Kind matches the given one
func InCaseOfRegex ¶
InCaseOfRegex In case of the given regex rule matches its value
func InCaseOfSumType ¶
InCaseOfSumType In case of its SumType matches the given one
type PatternMatching ¶
type PatternMatching struct {
// contains filtered or unexported fields
}
PatternMatching PatternMatching contains Pattern list
func DefPattern ¶
func DefPattern(patterns ...Pattern) PatternMatching
DefPattern Define the PatternMatching by Pattern list
func (PatternMatching) MatchFor ¶
func (patternMatchingSelf PatternMatching) MatchFor(inValue interface{}) interface{}
MatchFor Check does the given value match anyone of the Pattern list of PatternMatching
type PredicateErr ¶
PredicateErr Predicate Functor
type ProductType ¶
type ProductType struct {
// contains filtered or unexported fields
}
ProductType ProductType with a Kind list
func (ProductType) Matches ¶
func (typeSelf ProductType) Matches(value ...interface{}) bool
Matches Check does it match the ProductType
type PublisherDef ¶
type PublisherDef[T any] struct { // contains filtered or unexported fields }
PublisherDef Publisher inspired by Rx/NotificationCenter/PubSub
var Publisher PublisherDef[interface{}]
Publisher Publisher utils instance
func PublisherNewGenerics ¶
func PublisherNewGenerics[T any]() *PublisherDef[T]
PublisherNewGenerics New a Publisher
func (*PublisherDef[T]) Map ¶
func (publisherSelf *PublisherDef[T]) Map(fn func(T) T) *PublisherDef[T]
Map Map the Publisher in order to make a broadcasting chain
func (*PublisherDef[T]) New ¶
func (publisherSelf *PublisherDef[T]) New() *PublisherDef[interface{}]
New New a Publisher
func (*PublisherDef[T]) Publish ¶
func (publisherSelf *PublisherDef[T]) Publish(result T)
Publish Publish a value to its subscribers or next chains
func (*PublisherDef[T]) Subscribe ¶
func (publisherSelf *PublisherDef[T]) Subscribe(sub Subscription[T]) *Subscription[T]
Subscribe Subscribe the Publisher by Subscription[T]
func (*PublisherDef[T]) SubscribeOn ¶
func (publisherSelf *PublisherDef[T]) SubscribeOn(h *HandlerDef) *PublisherDef[T]
SubscribeOn Subscribe the Publisher on the specific Handler
func (*PublisherDef[T]) Unsubscribe ¶
func (publisherSelf *PublisherDef[T]) Unsubscribe(s *Subscription[T])
Unsubscribe Unsubscribe the publisher by the Subscription[T]
type Queue ¶ added in v2.2.0
type Queue[T any] interface { Put(val T) error Take() (T, error) Offer(val T) error Poll() (T, error) }
Queue Queue inspired by Collection utils
type ReducerFunctor ¶
ReducerFunctor Functor for Reduce
type RegexPatternDef ¶
type RegexPatternDef struct {
// contains filtered or unexported fields
}
RegexPatternDef Pattern which matching when the regex rule matches the given string
func (RegexPatternDef) Apply ¶
func (patternSelf RegexPatternDef) Apply(value interface{}) interface{}
Apply Evaluate the result by its given effect function
func (RegexPatternDef) Matches ¶
func (patternSelf RegexPatternDef) Matches(value interface{}) bool
Matches Match the given value by the pattern
type SetDef ¶
type SetDef[T comparable, R comparable] interface { MapKey(fn TransformerFunctor[T, T]) SetDef[T, R] MapValue(fn TransformerFunctor[R, R]) SetDef[T, R] ContainsKey(input T) bool ContainsValue(input R) bool IsSubsetByKey(input SetDef[T, R]) bool IsSupersetByKey(input SetDef[T, R]) bool Add(input ...T) SetDef[T, R] RemoveKeys(input ...T) SetDef[T, R] RemoveValues(input ...R) SetDef[T, R] Get(key T) R Set(key T, value R) Clone() SetDef[T, R] Union(input SetDef[T, R]) SetDef[T, R] Intersection(input SetDef[T, R]) SetDef[T, R] Minus(input SetDef[T, R]) SetDef[T, R] Size() int Keys() []T Values() []R AsMap() map[T]R AsMapSet() *MapSetDef[T, R] }
SetDef Set inspired by Collection utils
type SetForInterfaceDef ¶
type SetForInterfaceDef map[interface{}]interface{}
SetForInterfaceDef Set inspired by Collection utils
var Set SetForInterfaceDef
Set Set utils instance
func SetForInterfaceFrom ¶
func SetForInterfaceFrom(list ...interface{}) *SetForInterfaceDef
SetForInterfaceFrom New Set instance from a interface{} array
func SetForInterfaceFromArray ¶
func SetForInterfaceFromArray(list []interface{}) *SetForInterfaceDef
SetForInterfaceFromArray New Set instance from a interface{} array
func SetForInterfaceFromMap ¶
func SetForInterfaceFromMap(theMap map[interface{}]interface{}) *SetForInterfaceDef
SetForInterfaceFromMap New Set instance from a map[interface{}]R
func (*SetForInterfaceDef) Add ¶
func (setSelf *SetForInterfaceDef) Add(input ...interface{}) *SetForInterfaceDef
Add Add items into the Set
func (*SetForInterfaceDef) Clone ¶
func (setSelf *SetForInterfaceDef) Clone() *SetForInterfaceDef
Clone Clone this Set
func (*SetForInterfaceDef) ContainsKey ¶
func (setSelf *SetForInterfaceDef) ContainsKey(input interface{}) bool
ContainsKey Check the key exists or not in the Set
func (*SetForInterfaceDef) ContainsValue ¶
func (setSelf *SetForInterfaceDef) ContainsValue(input interface{}) bool
ContainsValue Check the value exists or not in the Set
func (*SetForInterfaceDef) Get ¶
func (setSelf *SetForInterfaceDef) Get(key interface{}) interface{}
Get Get items from the Set
func (*SetForInterfaceDef) Intersection ¶
func (setSelf *SetForInterfaceDef) Intersection(input *SetForInterfaceDef) *SetForInterfaceDef
Intersection Get the Intersection with this Set and an another Set
func (*SetForInterfaceDef) IsSubsetByKey ¶
func (setSelf *SetForInterfaceDef) IsSubsetByKey(input *SetForInterfaceDef) bool
IsSubsetByKey returns true or false by checking if set1 is a subset of set2
func (*SetForInterfaceDef) IsSupersetByKey ¶
func (setSelf *SetForInterfaceDef) IsSupersetByKey(input *SetForInterfaceDef) bool
IsSupersetByKey returns true or false by checking if set1 is a superset of set2
func (*SetForInterfaceDef) Keys ¶
func (setSelf *SetForInterfaceDef) Keys() []interface{}
Keys Convert Set to slice
func (*SetForInterfaceDef) MapKey ¶
func (setSelf *SetForInterfaceDef) MapKey(fn TransformerFunctor[interface{}, interface{}]) *SetForInterfaceDef
MapKey Map all keys of Set by function
func (*SetForInterfaceDef) MapValue ¶
func (setSelf *SetForInterfaceDef) MapValue(fn TransformerFunctor[interface{}, interface{}]) *SetForInterfaceDef
MapValue Map all values of Set by function
func (*SetForInterfaceDef) Minus ¶
func (setSelf *SetForInterfaceDef) Minus(input *SetForInterfaceDef) *SetForInterfaceDef
Minus Get all of this Set but not in the given Set
func (*SetForInterfaceDef) RemoveKeys ¶
func (setSelf *SetForInterfaceDef) RemoveKeys(input ...interface{}) *SetForInterfaceDef
RemoveKeys Remove keys from the Set
func (*SetForInterfaceDef) RemoveValues ¶
func (setSelf *SetForInterfaceDef) RemoveValues(input ...interface{}) *SetForInterfaceDef
RemoveValues Remove values from the Set
func (*SetForInterfaceDef) Set ¶
func (setSelf *SetForInterfaceDef) Set(key interface{}, value interface{})
Set Set items to the Set
func (*SetForInterfaceDef) Union ¶
func (setSelf *SetForInterfaceDef) Union(input *SetForInterfaceDef) *SetForInterfaceDef
Union Union an another Set object
func (*SetForInterfaceDef) Values ¶
func (setSelf *SetForInterfaceDef) Values() []interface{}
Values Convert Set to slice
type SimpleSortDescriptor ¶
type SimpleSortDescriptor[T any] struct { // contains filtered or unexported fields }
SimpleSortDescriptor SimpleSortDescriptor implemented by TransformerFunctor
func NewSimpleSortDescriptor ¶
func NewSimpleSortDescriptor[T any](transformFn TransformerFunctor[T, Comparable[interface{}]], ascending bool) SimpleSortDescriptor[T]
NewSimpleSortDescriptor Generate a new SimpleSortDescriptor by TransformerFunctor & ascending(true)/descending(false)
func (SimpleSortDescriptor[T]) IsAscending ¶
func (descriptor SimpleSortDescriptor[T]) IsAscending() bool
IsAscending Check is this SortDescriptor sorting by ascending
func (SimpleSortDescriptor[T]) SetAscending ¶
func (descriptor SimpleSortDescriptor[T]) SetAscending(val bool)
SetAscending Set this SortDescriptor sorting by ascending(true) or descending(false)
func (SimpleSortDescriptor[T]) TransformedBy ¶
func (descriptor SimpleSortDescriptor[T]) TransformedBy() TransformerFunctor[T, Comparable[interface{}]]
TransformedBy Get the TransformerFunctor of this SortDescriptor
type SortDescriptor ¶
type SortDescriptor[T any] interface { Transformer[T, Comparable[any]] IsAscending() bool SetAscending(bool) }
SortDescriptor Define a Transformer Pattern SortDescriptor
type SortDescriptorsBuilder ¶
type SortDescriptorsBuilder[T any] []SortDescriptor[T]
SortDescriptorsBuilder SortDescriptorsBuilder for composing SortDescriptor list and sorting data
func NewSortDescriptorsBuilder ¶
func NewSortDescriptorsBuilder[T any]() SortDescriptorsBuilder[T]
NewSortDescriptorsBuilder Generate a new SortDescriptorsBuilder
func (SortDescriptorsBuilder[T]) GetSortDescriptors ¶
func (builder SortDescriptorsBuilder[T]) GetSortDescriptors() []SortDescriptor[T]
GetSortDescriptors Get sortDescriptors
func (SortDescriptorsBuilder[T]) Sort ¶
func (builder SortDescriptorsBuilder[T]) Sort(input []T)
Sort Sort by sortDescriptors
func (SortDescriptorsBuilder[T]) ThenWith ¶
func (builder SortDescriptorsBuilder[T]) ThenWith(input ...SortDescriptor[T]) SortDescriptorsBuilder[T]
ThenWith Append a SortDescriptor
func (SortDescriptorsBuilder[T]) ThenWithFieldName ¶
func (builder SortDescriptorsBuilder[T]) ThenWithFieldName(fieldName string, ascending bool) SortDescriptorsBuilder[T]
ThenWithFieldName Use FieldName as a SortDescriptor
func (SortDescriptorsBuilder[T]) ThenWithTransformerFunctor ¶
func (builder SortDescriptorsBuilder[T]) ThenWithTransformerFunctor(transformFn TransformerFunctor[T, Comparable[interface{}]], ascending bool) SortDescriptorsBuilder[T]
ThenWithTransformerFunctor Use TransformerFunctor as a SortDescriptor
func (SortDescriptorsBuilder[T]) ToSortedList ¶
func (builder SortDescriptorsBuilder[T]) ToSortedList(input ...T) []T
ToSortedList Get the sorted result
type StreamDef ¶
type StreamDef[T comparable] []T
StreamDef Stream inspired by Collection utils
func StreamFrom ¶
func StreamFrom[T comparable](list ...T) *StreamDef[T]
StreamFrom New Stream instance from a T array
func StreamFromArray ¶
func StreamFromArray[T comparable](list []T) *StreamDef[T]
StreamFromArray New Stream instance from a T array
func (*StreamDef[T]) FilterNotNil ¶
FilterNotNil Filter not nil items and return a new Stream instance
func (*StreamDef[T]) Intersection ¶
Intersection Get the Intersection with this Stream and an another Stream
func (*StreamDef[T]) IsSubset ¶
IsSubset returns true or false by checking if stream1 is a subset of stream2
func (*StreamDef[T]) IsSuperset ¶
IsSuperset returns true or false by checking if stream1 is a superset of stream2
func (*StreamDef[T]) RemoveItem ¶
RemoveItem Remove items from the Stream
func (*StreamDef[T]) Sort ¶
func (streamSelf *StreamDef[T]) Sort(fn Comparator[T]) *StreamDef[T]
Sort Sort Stream items by Comparator
func (*StreamDef[T]) SortByIndex ¶
SortByIndex Sort Stream items by function(index, index) bool
type StreamForInterfaceDef ¶
type StreamForInterfaceDef []interface{}
StreamForInterfaceDef Stream inspired by Collection utils
var StreamForInterface StreamForInterfaceDef
StreamForInterface Stream utils instance
func (*StreamForInterfaceDef) Append ¶
func (streamSelf *StreamForInterfaceDef) Append(item ...interface{}) *StreamForInterfaceDef
Append Append an item to Stream
func (*StreamForInterfaceDef) Clone ¶
func (streamSelf *StreamForInterfaceDef) Clone() *StreamForInterfaceDef
Clone Clone this Stream
func (*StreamForInterfaceDef) Concat ¶
func (streamSelf *StreamForInterfaceDef) Concat(slices ...[]interface{}) *StreamForInterfaceDef
Concat Concat Stream by another slices
func (*StreamForInterfaceDef) Contains ¶
func (streamSelf *StreamForInterfaceDef) Contains(input interface{}) bool
Contains Check the item exists or not in the Stream
func (*StreamForInterfaceDef) Distinct ¶
func (streamSelf *StreamForInterfaceDef) Distinct() *StreamForInterfaceDef
Distinct Filter duplicated items and return a new Stream instance
func (*StreamForInterfaceDef) Extend ¶
func (streamSelf *StreamForInterfaceDef) Extend(streams ...*StreamForInterfaceDef) *StreamForInterfaceDef
Extend Extend Stream by another Stream(s)
func (*StreamForInterfaceDef) Filter ¶
func (streamSelf *StreamForInterfaceDef) Filter(fn func(interface{}, int) bool) *StreamForInterfaceDef
Filter Filter items of Stream by function
func (*StreamForInterfaceDef) FilterNotNil ¶
func (streamSelf *StreamForInterfaceDef) FilterNotNil() *StreamForInterfaceDef
FilterNotNil Filter not nil items and return a new Stream instance
func (*StreamForInterfaceDef) From ¶
func (streamSelf *StreamForInterfaceDef) From(list ...interface{}) *StreamForInterfaceDef
From New Stream instance from a interface{} array
func (*StreamForInterfaceDef) FromArray ¶
func (streamSelf *StreamForInterfaceDef) FromArray(list []interface{}) *StreamForInterfaceDef
FromArray New Stream instance from an interface{} array
func (*StreamForInterfaceDef) FromArrayBool ¶
func (streamSelf *StreamForInterfaceDef) FromArrayBool(old []bool) *StreamForInterfaceDef
FromArrayBool New Stream instance from a bool array
func (*StreamForInterfaceDef) FromArrayByte ¶
func (streamSelf *StreamForInterfaceDef) FromArrayByte(old []byte) *StreamForInterfaceDef
FromArrayByte New Stream instance from an int8 array
func (*StreamForInterfaceDef) FromArrayFloat32 ¶
func (streamSelf *StreamForInterfaceDef) FromArrayFloat32(old []float32) *StreamForInterfaceDef
FromArrayFloat32 New Stream instance from a float32 array
func (*StreamForInterfaceDef) FromArrayFloat64 ¶
func (streamSelf *StreamForInterfaceDef) FromArrayFloat64(old []float64) *StreamForInterfaceDef
FromArrayFloat64 New Stream instance from a float64 array
func (*StreamForInterfaceDef) FromArrayInt ¶
func (streamSelf *StreamForInterfaceDef) FromArrayInt(old []int) *StreamForInterfaceDef
FromArrayInt New Stream instance from an int array
func (*StreamForInterfaceDef) FromArrayInt16 ¶
func (streamSelf *StreamForInterfaceDef) FromArrayInt16(old []int16) *StreamForInterfaceDef
FromArrayInt16 New Stream instance from an int16 array
func (*StreamForInterfaceDef) FromArrayInt32 ¶
func (streamSelf *StreamForInterfaceDef) FromArrayInt32(old []int32) *StreamForInterfaceDef
FromArrayInt32 New Stream instance from an int32 array
func (*StreamForInterfaceDef) FromArrayInt64 ¶
func (streamSelf *StreamForInterfaceDef) FromArrayInt64(old []int64) *StreamForInterfaceDef
FromArrayInt64 New Stream instance from an int64 array
func (*StreamForInterfaceDef) FromArrayInt8 ¶
func (streamSelf *StreamForInterfaceDef) FromArrayInt8(old []int8) *StreamForInterfaceDef
FromArrayInt8 New Stream instance from an int8 array
func (*StreamForInterfaceDef) FromArrayMaybe ¶
func (streamSelf *StreamForInterfaceDef) FromArrayMaybe(old []MaybeDef[interface{}]) *StreamForInterfaceDef
FromArrayMaybe FromArrayMaybe New Stream instance from a Maybe array
func (*StreamForInterfaceDef) FromArrayString ¶
func (streamSelf *StreamForInterfaceDef) FromArrayString(old []string) *StreamForInterfaceDef
FromArrayString New Stream instance from a string array
func (*StreamForInterfaceDef) Get ¶
func (streamSelf *StreamForInterfaceDef) Get(i int) interface{}
Get Get an item of Stream by its index
func (*StreamForInterfaceDef) Intersection ¶
func (streamSelf *StreamForInterfaceDef) Intersection(input *StreamForInterfaceDef) *StreamForInterfaceDef
Intersection Get the Intersection with this Stream and an another Stream
func (*StreamForInterfaceDef) IsSubset ¶
func (streamSelf *StreamForInterfaceDef) IsSubset(input *StreamForInterfaceDef) bool
IsSubset returns true or false by checking if stream1 is a subset of stream2
func (*StreamForInterfaceDef) IsSuperset ¶
func (streamSelf *StreamForInterfaceDef) IsSuperset(input *StreamForInterfaceDef) bool
IsSuperset returns true or false by checking if stream1 is a superset of stream2
func (*StreamForInterfaceDef) Len ¶
func (streamSelf *StreamForInterfaceDef) Len() int
Len Get length of Stream
func (*StreamForInterfaceDef) Map ¶
func (streamSelf *StreamForInterfaceDef) Map(fn func(interface{}, int) interface{}) *StreamForInterfaceDef
Map Map all items of Stream by function
func (*StreamForInterfaceDef) Minus ¶
func (streamSelf *StreamForInterfaceDef) Minus(input *StreamForInterfaceDef) *StreamForInterfaceDef
Minus Get all of this Stream but not in the given Stream
func (*StreamForInterfaceDef) Reject ¶
func (streamSelf *StreamForInterfaceDef) Reject(fn func(interface{}, int) bool) *StreamForInterfaceDef
Reject Reject items of Stream by function
func (*StreamForInterfaceDef) Remove ¶
func (streamSelf *StreamForInterfaceDef) Remove(index int) *StreamForInterfaceDef
Remove Remove an item by its index
func (*StreamForInterfaceDef) RemoveItem ¶
func (streamSelf *StreamForInterfaceDef) RemoveItem(input ...interface{}) *StreamForInterfaceDef
RemoveItem Remove items from the Stream
func (*StreamForInterfaceDef) Reverse ¶
func (streamSelf *StreamForInterfaceDef) Reverse() *StreamForInterfaceDef
Reverse Reverse Stream items
func (*StreamForInterfaceDef) Sort ¶
func (streamSelf *StreamForInterfaceDef) Sort(fn Comparator[interface{}]) *StreamForInterfaceDef
Sort Sort Stream items by Comparator
func (*StreamForInterfaceDef) SortByIndex ¶
func (streamSelf *StreamForInterfaceDef) SortByIndex(fn func(a, b int) bool) *StreamForInterfaceDef
SortByIndex Sort Stream items by function(index, index) bool
func (*StreamForInterfaceDef) ToArray ¶
func (streamSelf *StreamForInterfaceDef) ToArray() []interface{}
ToArray Convert Stream to slice
type StreamSetDef ¶
type StreamSetDef[T comparable, R comparable] struct { MapSetDef[T, *StreamDef[R]] }
StreamSetDef StreamSet inspired by Collection utils
func NewStreamSet ¶
func NewStreamSet[T comparable, R comparable]() *StreamSetDef[T, R]
NewStreamSet New StreamSet instance
func StreamSetFrom ¶
func StreamSetFrom[T comparable, R comparable](list ...T) *StreamSetDef[T, R]
StreamSetFrom New StreamSet instance from a T array
func StreamSetFromArray ¶
func StreamSetFromArray[T comparable, R comparable](list []T) *StreamSetDef[T, R]
StreamSetFromArray New StreamSet instance from a T array
func StreamSetFromMap ¶
func StreamSetFromMap[T comparable, R comparable](theMap map[T]*StreamDef[R]) *StreamSetDef[T, R]
StreamSetFromMap New StreamSet instance from a map[T]R
func (*StreamSetDef[T, R]) Clone ¶
func (streamSetSelf *StreamSetDef[T, R]) Clone() *StreamSetDef[T, R]
Clone Clone this StreamSet
func (*StreamSetDef[T, R]) Intersection ¶
func (streamSetSelf *StreamSetDef[T, R]) Intersection(input *StreamSetDef[T, R]) *StreamSetDef[T, R]
Intersection Get the Intersection with this StreamSet and an another StreamSet
func (*StreamSetDef[T, R]) MinusStreams ¶
func (streamSetSelf *StreamSetDef[T, R]) MinusStreams(input *StreamSetDef[T, R]) *StreamSetDef[T, R]
MinusStreams Minus the Stream values by their keys(keys will not be changed but Stream values will)
func (*StreamSetDef[T, R]) Union ¶
func (streamSetSelf *StreamSetDef[T, R]) Union(input *StreamSetDef[T, R]) *StreamSetDef[T, R]
Union Union an another StreamSet object
type StreamSetForInterfaceDef ¶
type StreamSetForInterfaceDef struct {
SetForInterfaceDef
}
StreamSetForInterfaceDef Set inspired by Collection utils
var StreamSetForInterface StreamSetForInterfaceDef
StreamSetForInterface StreamSetForInterface utils instance
func NewStreamSetForInterface ¶
func NewStreamSetForInterface() *StreamSetForInterfaceDef
NewStreamSetForInterface New StreamSetForInterface instance
func StreamSetForInterfaceFrom ¶
func StreamSetForInterfaceFrom(list ...interface{}) *StreamSetForInterfaceDef
StreamSetForInterfaceFrom New StreamSetForInterface instance from a T array
func StreamSetForInterfaceFromArray ¶
func StreamSetForInterfaceFromArray(list []interface{}) *StreamSetForInterfaceDef
StreamSetForInterfaceFromArray New StreamSetForInterface instance from a T array
func StreamSetForInterfaceFromMap ¶
func StreamSetForInterfaceFromMap(theMap map[interface{}]*StreamForInterfaceDef) *StreamSetForInterfaceDef
StreamSetForInterfaceFromMap New StreamSetForInterface instance from a map[T]R
func StreamSetFromArrayInterface ¶
func StreamSetFromArrayInterface(list []interface{}) *StreamSetForInterfaceDef
StreamSetFromArrayInterface New StreamSetForInterface instance from an array
func StreamSetFromInterface ¶
func StreamSetFromInterface(list ...interface{}) *StreamSetForInterfaceDef
StreamSetFromInterface New StreamSetForInterface instance from an array
func (*StreamSetForInterfaceDef) Clone ¶
func (streamSetSelf *StreamSetForInterfaceDef) Clone() *StreamSetForInterfaceDef
Clone Clone this StreamSetForInterface
func (*StreamSetForInterfaceDef) Intersection ¶
func (streamSetSelf *StreamSetForInterfaceDef) Intersection(input *StreamSetForInterfaceDef) *StreamSetForInterfaceDef
Intersection Get the Intersection with this StreamSetForInterface and an another StreamSetForInterface
func (*StreamSetForInterfaceDef) IsSubsetByKey ¶
func (streamSetSelf *StreamSetForInterfaceDef) IsSubsetByKey(input *StreamSetForInterfaceDef) bool
IsSubsetByKey TODO NOTE !!Duplicated!! returns true or false by checking if set1 is a subset of set2
func (*StreamSetForInterfaceDef) IsSupersetByKey ¶
func (streamSetSelf *StreamSetForInterfaceDef) IsSupersetByKey(input *StreamSetForInterfaceDef) bool
IsSupersetByKey TODO NOTE !!Duplicated!! returns true or false by checking if set1 is a superset of set2
func (*StreamSetForInterfaceDef) Minus ¶
func (streamSetSelf *StreamSetForInterfaceDef) Minus(input *StreamSetForInterfaceDef) *StreamSetForInterfaceDef
Minus TODO NOTE !!Duplicated!! Get all of this StreamSetForInterface but not in the given StreamSetForInterface
func (*StreamSetForInterfaceDef) MinusStreams ¶
func (streamSetSelf *StreamSetForInterfaceDef) MinusStreams(input *StreamSetForInterfaceDef) *StreamSetForInterfaceDef
MinusStreams Minus the Stream values by their keys(keys will not be changed but Stream values will)
func (*StreamSetForInterfaceDef) Union ¶
func (streamSetSelf *StreamSetForInterfaceDef) Union(input *StreamSetForInterfaceDef) *StreamSetForInterfaceDef
Union Union an another StreamSetForInterface object
type Subscription ¶
type Subscription[T any] struct { OnNext func(T) }
Subscription the delegation/callback of MonadIO/Publisher
type SumType ¶
type SumType struct {
// contains filtered or unexported fields
}
SumType SumType contains a CompType list
type Transformer ¶
type Transformer[T any, R any] interface { TransformedBy() TransformerFunctor[T, R] }
Transformer Define Transformer Pattern interface
type TransformerFunctor ¶
TransformerFunctor Functor of Transform