tests

package
v0.0.0-...-aea69b8 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AA

type AA struct {
	B *b

	C *c
	// contains filtered or unexported fields
}

derive-access

func (*AA) GetB

func (a *AA) GetB() *b

func (*AA) GetC

func (a *AA) GetC() *c

type Int

type Int = int

derive-set derive-slice

type Int2

type Int2 = int

derive-set:Rename=intOrderSet;Order=Append

type Int3

type Int3 = int

derive-set:Order=Key

type Int3Set

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

func NewAscendingInt3Set

func NewAscendingInt3Set(capacity int) *Int3Set

func NewAscendingInt3SetFromSlice

func NewAscendingInt3SetFromSlice(items []int) *Int3Set

func NewDescendingInt3Set

func NewDescendingInt3Set(capacity int) *Int3Set

func NewDescendingInt3SetFromSlice

func NewDescendingInt3SetFromSlice(items []int) *Int3Set

func NewInt3Set

func NewInt3Set(capacity int, cmp func(i, j int) bool) *Int3Set

func NewInt3SetFromSlice

func NewInt3SetFromSlice(items []int, cmp func(i, j int) bool) *Int3Set

func (*Int3Set) All

func (set *Int3Set) All(f func(int) bool) bool

func (*Int3Set) Any

func (set *Int3Set) Any(f func(int) bool) bool

func (*Int3Set) Append

func (set *Int3Set) Append(keys ...int)

func (*Int3Set) Clear

func (set *Int3Set) Clear()

func (*Int3Set) Clone

func (set *Int3Set) Clone() *Int3Set

func (*Int3Set) Contains

func (set *Int3Set) Contains(key int) bool

func (*Int3Set) ContainsAll

func (set *Int3Set) ContainsAll(keys ...int) bool

func (*Int3Set) ContainsAny

func (set *Int3Set) ContainsAny(keys ...int) bool

func (*Int3Set) CountBy

func (set *Int3Set) CountBy(f func(int) bool) int

func (*Int3Set) Difference

func (set *Int3Set) Difference(another *Int3Set) *Int3Set

func (*Int3Set) DoUntil

func (set *Int3Set) DoUntil(f func(int) bool) int

func (*Int3Set) DoUntilError

func (set *Int3Set) DoUntilError(f func(int) error) error

func (*Int3Set) DoWhile

func (set *Int3Set) DoWhile(f func(int) bool) int

func (*Int3Set) Equal

func (set *Int3Set) Equal(another *Int3Set) bool

func (*Int3Set) Filter

func (set *Int3Set) Filter(f func(int) bool) *Int3Set

func (*Int3Set) FilterMap

func (set *Int3Set) FilterMap(f interface{}) interface{}

f: func(int) *T

func(int) (T, bool)
func(int) (T, error)

return: []T

func (*Int3Set) FindBy

func (set *Int3Set) FindBy(f func(int) bool) *int

func (*Int3Set) FindLastBy

func (set *Int3Set) FindLastBy(f func(int) bool) *int

func (*Int3Set) Fold

func (set *Int3Set) Fold(init int, f func(int, int) int) int

func (*Int3Set) ForEach

func (set *Int3Set) ForEach(f func(int))

func (*Int3Set) ForEachWithIndex

func (set *Int3Set) ForEachWithIndex(f func(int, int))

func (*Int3Set) GroupBy

func (set *Int3Set) GroupBy(f func(int) interface{}) map[interface{}]*Int3Set

func (*Int3Set) GroupByBool

func (set *Int3Set) GroupByBool(f func(int) bool) (trueGroup *Int3Set, falseGroup *Int3Set)

func (*Int3Set) GroupByInt

func (set *Int3Set) GroupByInt(f func(int) int) map[int]*Int3Set

func (*Int3Set) GroupByStr

func (set *Int3Set) GroupByStr(f func(int) string) map[string]*Int3Set

func (*Int3Set) InPlaceUnion

func (set *Int3Set) InPlaceUnion(another *Int3Set)

func (*Int3Set) Intersect

func (set *Int3Set) Intersect(another *Int3Set) *Int3Set

func (*Int3Set) IsEmpty

func (set *Int3Set) IsEmpty() bool

func (*Int3Set) IsProperSubsetOf

func (set *Int3Set) IsProperSubsetOf(another *Int3Set) bool

func (*Int3Set) IsProperSupersetOf

func (set *Int3Set) IsProperSupersetOf(another *Int3Set) bool

func (*Int3Set) IsSubsetOf

func (set *Int3Set) IsSubsetOf(another *Int3Set) bool

func (*Int3Set) IsSupersetOf

func (set *Int3Set) IsSupersetOf(another *Int3Set) bool

func (*Int3Set) Len

func (set *Int3Set) Len() int

func (*Int3Set) Map

func (set *Int3Set) Map(f interface{}) interface{}

f: func(int) T return: []T

func (Int3Set) MarshalJSON

func (set Int3Set) MarshalJSON() ([]byte, error)

func (*Int3Set) Reduce

func (set *Int3Set) Reduce(f func(int, int) int) int

func (*Int3Set) Remove

func (set *Int3Set) Remove(key int)

func (*Int3Set) String

func (set *Int3Set) String() string

func (*Int3Set) ToSlice

func (set *Int3Set) ToSlice() []int

func (*Int3Set) ToSliceRef

func (set *Int3Set) ToSliceRef() []int

NOTICE: efficient but unsafe

func (*Int3Set) Union

func (set *Int3Set) Union(another *Int3Set) *Int3Set

func (*Int3Set) UnmarshalJSON

func (set *Int3Set) UnmarshalJSON(b []byte) error

type IntSet

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

func NewIntSet

func NewIntSet(capacity int) *IntSet

func NewIntSetFromSlice

func NewIntSetFromSlice(items []int) *IntSet

func (*IntSet) All

func (set *IntSet) All(f func(int) bool) bool

func (*IntSet) Any

func (set *IntSet) Any(f func(int) bool) bool

func (*IntSet) Append

func (set *IntSet) Append(keys ...int)

func (*IntSet) Clear

func (set *IntSet) Clear()

func (*IntSet) Clone

func (set *IntSet) Clone() *IntSet

func (*IntSet) Contains

func (set *IntSet) Contains(key int) bool

func (*IntSet) ContainsAll

func (set *IntSet) ContainsAll(keys ...int) bool

func (*IntSet) ContainsAny

func (set *IntSet) ContainsAny(keys ...int) bool

func (*IntSet) CountBy

func (set *IntSet) CountBy(f func(int) bool) int

func (*IntSet) Difference

func (set *IntSet) Difference(another *IntSet) *IntSet

func (*IntSet) DoUntilError

func (set *IntSet) DoUntilError(f func(int) error) error

func (*IntSet) Equal

func (set *IntSet) Equal(another *IntSet) bool

func (*IntSet) Filter

func (set *IntSet) Filter(f func(int) bool) *IntSet

func (*IntSet) FilterMap

func (set *IntSet) FilterMap(f interface{}) interface{}

f: func(int) *T

func(int) (T, bool)
func(int) (T, error)

return: []T

func (*IntSet) FindBy

func (set *IntSet) FindBy(f func(int) bool) *int

func (*IntSet) Fold

func (set *IntSet) Fold(init int, f func(int, int) int) int

func (*IntSet) ForEach

func (set *IntSet) ForEach(f func(int))

func (*IntSet) GroupBy

func (set *IntSet) GroupBy(f func(int) interface{}) map[interface{}]*IntSet

func (*IntSet) GroupByBool

func (set *IntSet) GroupByBool(f func(int) bool) (trueGroup *IntSet, falseGroup *IntSet)

func (*IntSet) GroupByInt

func (set *IntSet) GroupByInt(f func(int) int) map[int]*IntSet

func (*IntSet) GroupByStr

func (set *IntSet) GroupByStr(f func(int) string) map[string]*IntSet

func (*IntSet) InPlaceUnion

func (set *IntSet) InPlaceUnion(another *IntSet)

func (*IntSet) Intersect

func (set *IntSet) Intersect(another *IntSet) *IntSet

func (*IntSet) IsEmpty

func (set *IntSet) IsEmpty() bool

func (*IntSet) IsProperSubsetOf

func (set *IntSet) IsProperSubsetOf(another *IntSet) bool

func (*IntSet) IsProperSupersetOf

func (set *IntSet) IsProperSupersetOf(another *IntSet) bool

func (*IntSet) IsSubsetOf

func (set *IntSet) IsSubsetOf(another *IntSet) bool

func (*IntSet) IsSupersetOf

func (set *IntSet) IsSupersetOf(another *IntSet) bool

func (*IntSet) Len

func (set *IntSet) Len() int

func (*IntSet) Map

func (set *IntSet) Map(f interface{}) interface{}

f: func(int) T return: []T

func (IntSet) MarshalJSON

func (set IntSet) MarshalJSON() ([]byte, error)

func (*IntSet) Reduce

func (set *IntSet) Reduce(f func(int, int) int) int

func (*IntSet) Remove

func (set *IntSet) Remove(key int)

func (*IntSet) String

func (set *IntSet) String() string

func (*IntSet) ToSlice

func (set *IntSet) ToSlice() []int

func (*IntSet) Union

func (set *IntSet) Union(another *IntSet) *IntSet

func (*IntSet) UnmarshalJSON

func (set *IntSet) UnmarshalJSON(b []byte) error

type IntSlice

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

func NewIntSlice

func NewIntSlice(capacity int) *IntSlice

func NewIntSliceFromSlice

func NewIntSliceFromSlice(slice []int) *IntSlice

func (*IntSlice) All

func (s *IntSlice) All(f func(int) bool) bool

func (*IntSlice) Any

func (s *IntSlice) Any(f func(int) bool) bool

func (*IntSlice) Append

func (s *IntSlice) Append(items ...int)

func (*IntSlice) Clear

func (s *IntSlice) Clear()

func (*IntSlice) Clone

func (s *IntSlice) Clone() *IntSlice

func (*IntSlice) Concat

func (s *IntSlice) Concat(another *IntSlice) *IntSlice

func (*IntSlice) Count

func (s *IntSlice) Count(item int) uint

func (*IntSlice) CountBy

func (s *IntSlice) CountBy(f func(int) bool) uint

func (*IntSlice) DoUntil

func (s *IntSlice) DoUntil(f func(int) bool) int

func (*IntSlice) DoUntilError

func (s *IntSlice) DoUntilError(f func(int) error) error

func (*IntSlice) DoWhile

func (s *IntSlice) DoWhile(f func(int) bool) int

func (*IntSlice) Equal

func (s *IntSlice) Equal(another *IntSlice) bool

func (*IntSlice) Filter

func (s *IntSlice) Filter(f func(int) bool) *IntSlice

func (*IntSlice) FilterMap

func (s *IntSlice) FilterMap(f interface{}) interface{}

f: func(int) *T

func(int) (T, bool)
func(int) (T, error)

return: []T

func (*IntSlice) Find

func (s *IntSlice) Find(item int) int

func (*IntSlice) FindBy

func (s *IntSlice) FindBy(f func(int) bool) int

func (*IntSlice) FindLast

func (s *IntSlice) FindLast(item int) int

func (*IntSlice) FindLastBy

func (s *IntSlice) FindLastBy(f func(int) bool) int

func (*IntSlice) Fold

func (s *IntSlice) Fold(init int, f func(int, int) int) int

func (*IntSlice) ForEach

func (s *IntSlice) ForEach(f func(int))

func (*IntSlice) ForEachWithIndex

func (s *IntSlice) ForEachWithIndex(f func(int, int))

func (*IntSlice) GroupBy

func (s *IntSlice) GroupBy(f func(int) interface{}) map[interface{}]*IntSlice

func (*IntSlice) GroupByBool

func (s *IntSlice) GroupByBool(f func(int) bool) (trueGroup, falseGroup *IntSlice)

func (IntSlice) GroupByInt

func (s IntSlice) GroupByInt(f func(int) int) map[int]*IntSlice

func (IntSlice) GroupByStr

func (s IntSlice) GroupByStr(f func(int) string) map[string]*IntSlice

func (*IntSlice) InPlaceConcat

func (s *IntSlice) InPlaceConcat(another *IntSlice)

func (*IntSlice) Index

func (s *IntSlice) Index(idx int) *int

func (*IntSlice) IndexFrom

func (s *IntSlice) IndexFrom(idx int) *IntSlice

func (*IntSlice) IndexRange

func (s *IntSlice) IndexRange(from, to int) *IntSlice

func (*IntSlice) IndexTo

func (s *IntSlice) IndexTo(idx int) *IntSlice

func (*IntSlice) Insert

func (s *IntSlice) Insert(idx int, items ...int)

func (*IntSlice) IsEmpty

func (s *IntSlice) IsEmpty() bool

func (*IntSlice) Len

func (s *IntSlice) Len() int

func (*IntSlice) Map

func (s *IntSlice) Map(f interface{}) interface{}

f: func(int) T return: []T

func (IntSlice) MarshalJSON

func (s IntSlice) MarshalJSON() ([]byte, error)

func (*IntSlice) Reduce

func (s *IntSlice) Reduce(f func(int, int) int) int

func (*IntSlice) Remove

func (s *IntSlice) Remove(idx int)

func (*IntSlice) RemoveFrom

func (s *IntSlice) RemoveFrom(idx int)

func (*IntSlice) RemoveRange

func (s *IntSlice) RemoveRange(from, to int)

func (*IntSlice) RemoveTo

func (s *IntSlice) RemoveTo(idx int)

func (*IntSlice) String

func (s *IntSlice) String() string

func (*IntSlice) ToSlice

func (s *IntSlice) ToSlice() []int

func (*IntSlice) ToSliceRef

func (s *IntSlice) ToSliceRef() []int

func (*IntSlice) UnmarshalJSON

func (s *IntSlice) UnmarshalJSON(b []byte) error

type MyType

type MyType struct {
	Field1 string
	// contains filtered or unexported fields
}

from this package derive-set: !Export

type NotComparableType

type NotComparableType = []int

derive-slice

type NotComparableTypeSlice

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

func NewNotComparableTypeSlice

func NewNotComparableTypeSlice(capacity int) *NotComparableTypeSlice

func NewNotComparableTypeSliceFromSlice

func NewNotComparableTypeSliceFromSlice(slice []NotComparableType) *NotComparableTypeSlice

func (*NotComparableTypeSlice) All

func (*NotComparableTypeSlice) Any

func (*NotComparableTypeSlice) Append

func (s *NotComparableTypeSlice) Append(items ...NotComparableType)

func (*NotComparableTypeSlice) Clear

func (s *NotComparableTypeSlice) Clear()

func (*NotComparableTypeSlice) Clone

func (*NotComparableTypeSlice) Concat

func (*NotComparableTypeSlice) CountBy

func (s *NotComparableTypeSlice) CountBy(f func(NotComparableType) bool) uint

func (*NotComparableTypeSlice) DoUntil

func (s *NotComparableTypeSlice) DoUntil(f func(NotComparableType) bool) int

func (*NotComparableTypeSlice) DoUntilError

func (s *NotComparableTypeSlice) DoUntilError(f func(NotComparableType) error) error

func (*NotComparableTypeSlice) DoWhile

func (s *NotComparableTypeSlice) DoWhile(f func(NotComparableType) bool) int

func (*NotComparableTypeSlice) Filter

func (*NotComparableTypeSlice) FilterMap

func (s *NotComparableTypeSlice) FilterMap(f interface{}) interface{}

f: func(NotComparableType) *T

func(NotComparableType) (T, bool)
func(NotComparableType) (T, error)

return: []T

func (*NotComparableTypeSlice) FindBy

func (s *NotComparableTypeSlice) FindBy(f func(NotComparableType) bool) int

func (*NotComparableTypeSlice) FindLastBy

func (s *NotComparableTypeSlice) FindLastBy(f func(NotComparableType) bool) int

func (*NotComparableTypeSlice) ForEach

func (s *NotComparableTypeSlice) ForEach(f func(NotComparableType))

func (*NotComparableTypeSlice) ForEachWithIndex

func (s *NotComparableTypeSlice) ForEachWithIndex(f func(int, NotComparableType))

func (*NotComparableTypeSlice) GroupBy

func (s *NotComparableTypeSlice) GroupBy(f func(NotComparableType) interface{}) map[interface{}]*NotComparableTypeSlice

func (*NotComparableTypeSlice) GroupByBool

func (s *NotComparableTypeSlice) GroupByBool(f func(NotComparableType) bool) (trueGroup, falseGroup *NotComparableTypeSlice)

func (NotComparableTypeSlice) GroupByInt

func (NotComparableTypeSlice) GroupByStr

func (*NotComparableTypeSlice) InPlaceConcat

func (s *NotComparableTypeSlice) InPlaceConcat(another *NotComparableTypeSlice)

func (*NotComparableTypeSlice) Index

func (*NotComparableTypeSlice) IndexFrom

func (*NotComparableTypeSlice) IndexRange

func (s *NotComparableTypeSlice) IndexRange(from, to int) *NotComparableTypeSlice

func (*NotComparableTypeSlice) IndexTo

func (*NotComparableTypeSlice) Insert

func (s *NotComparableTypeSlice) Insert(idx int, items ...NotComparableType)

func (*NotComparableTypeSlice) IsEmpty

func (s *NotComparableTypeSlice) IsEmpty() bool

func (*NotComparableTypeSlice) Len

func (s *NotComparableTypeSlice) Len() int

func (*NotComparableTypeSlice) Map

func (s *NotComparableTypeSlice) Map(f interface{}) interface{}

f: func(NotComparableType) T return: []T

func (NotComparableTypeSlice) MarshalJSON

func (s NotComparableTypeSlice) MarshalJSON() ([]byte, error)

func (*NotComparableTypeSlice) Reduce

func (*NotComparableTypeSlice) Remove

func (s *NotComparableTypeSlice) Remove(idx int)

func (*NotComparableTypeSlice) RemoveFrom

func (s *NotComparableTypeSlice) RemoveFrom(idx int)

func (*NotComparableTypeSlice) RemoveRange

func (s *NotComparableTypeSlice) RemoveRange(from, to int)

func (*NotComparableTypeSlice) RemoveTo

func (s *NotComparableTypeSlice) RemoveTo(idx int)

func (*NotComparableTypeSlice) String

func (s *NotComparableTypeSlice) String() string

func (*NotComparableTypeSlice) ToSlice

func (*NotComparableTypeSlice) ToSliceRef

func (s *NotComparableTypeSlice) ToSliceRef() []NotComparableType

func (*NotComparableTypeSlice) UnmarshalJSON

func (s *NotComparableTypeSlice) UnmarshalJSON(b []byte) error

type PSet

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

func NewPSet

func NewPSet(capacity int) *PSet

func NewPSetFromSlice

func NewPSetFromSlice(items []plugin.Plugin) *PSet

func (*PSet) All

func (set *PSet) All(f func(plugin.Plugin) bool) bool

func (*PSet) Any

func (set *PSet) Any(f func(plugin.Plugin) bool) bool

func (*PSet) Append

func (set *PSet) Append(keys ...plugin.Plugin)

func (*PSet) Clear

func (set *PSet) Clear()

func (*PSet) Clone

func (set *PSet) Clone() *PSet

func (*PSet) Contains

func (set *PSet) Contains(key plugin.Plugin) bool

func (*PSet) ContainsAll

func (set *PSet) ContainsAll(keys ...plugin.Plugin) bool

func (*PSet) ContainsAny

func (set *PSet) ContainsAny(keys ...plugin.Plugin) bool

func (*PSet) CountBy

func (set *PSet) CountBy(f func(plugin.Plugin) bool) int

func (*PSet) Difference

func (set *PSet) Difference(another *PSet) *PSet

func (*PSet) DoUntilError

func (set *PSet) DoUntilError(f func(plugin.Plugin) error) error

func (*PSet) Equal

func (set *PSet) Equal(another *PSet) bool

func (*PSet) Filter

func (set *PSet) Filter(f func(plugin.Plugin) bool) *PSet

func (*PSet) FilterMap

func (set *PSet) FilterMap(f interface{}) interface{}

f: func(plugin.Plugin) *T

func(plugin.Plugin) (T, bool)
func(plugin.Plugin) (T, error)

return: []T

func (*PSet) FindBy

func (set *PSet) FindBy(f func(plugin.Plugin) bool) *plugin.Plugin

func (*PSet) Fold

func (set *PSet) Fold(init plugin.Plugin, f func(plugin.Plugin, plugin.Plugin) plugin.Plugin) plugin.Plugin

func (*PSet) ForEach

func (set *PSet) ForEach(f func(plugin.Plugin))

func (*PSet) GroupBy

func (set *PSet) GroupBy(f func(plugin.Plugin) interface{}) map[interface{}]*PSet

func (*PSet) GroupByBool

func (set *PSet) GroupByBool(f func(plugin.Plugin) bool) (trueGroup *PSet, falseGroup *PSet)

func (*PSet) GroupByInt

func (set *PSet) GroupByInt(f func(plugin.Plugin) int) map[int]*PSet

func (*PSet) GroupByStr

func (set *PSet) GroupByStr(f func(plugin.Plugin) string) map[string]*PSet

func (*PSet) InPlaceUnion

func (set *PSet) InPlaceUnion(another *PSet)

func (*PSet) Intersect

func (set *PSet) Intersect(another *PSet) *PSet

func (*PSet) IsEmpty

func (set *PSet) IsEmpty() bool

func (*PSet) IsProperSubsetOf

func (set *PSet) IsProperSubsetOf(another *PSet) bool

func (*PSet) IsProperSupersetOf

func (set *PSet) IsProperSupersetOf(another *PSet) bool

func (*PSet) IsSubsetOf

func (set *PSet) IsSubsetOf(another *PSet) bool

func (*PSet) IsSupersetOf

func (set *PSet) IsSupersetOf(another *PSet) bool

func (*PSet) Len

func (set *PSet) Len() int

func (*PSet) Map

func (set *PSet) Map(f interface{}) interface{}

f: func(plugin.Plugin) T return: []T

func (PSet) MarshalJSON

func (set PSet) MarshalJSON() ([]byte, error)

func (*PSet) Reduce

func (set *PSet) Reduce(f func(plugin.Plugin, plugin.Plugin) plugin.Plugin) plugin.Plugin

func (*PSet) Remove

func (set *PSet) Remove(key plugin.Plugin)

func (*PSet) String

func (set *PSet) String() string

func (*PSet) ToSlice

func (set *PSet) ToSlice() []plugin.Plugin

func (*PSet) Union

func (set *PSet) Union(another *PSet) *PSet

func (*PSet) UnmarshalJSON

func (set *PSet) UnmarshalJSON(b []byte) error

type S

type S = string

derive-set:Order=Key

type SSet

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

func NewAscendingSSet

func NewAscendingSSet(capacity int) *SSet

func NewAscendingSSetFromSlice

func NewAscendingSSetFromSlice(items []string) *SSet

func NewDescendingSSet

func NewDescendingSSet(capacity int) *SSet

func NewDescendingSSetFromSlice

func NewDescendingSSetFromSlice(items []string) *SSet

func NewSSet

func NewSSet(capacity int, cmp func(i, j string) bool) *SSet

func NewSSetFromSlice

func NewSSetFromSlice(items []string, cmp func(i, j string) bool) *SSet

func (*SSet) All

func (set *SSet) All(f func(string) bool) bool

func (*SSet) Any

func (set *SSet) Any(f func(string) bool) bool

func (*SSet) Append

func (set *SSet) Append(keys ...string)

func (*SSet) Clear

func (set *SSet) Clear()

func (*SSet) Clone

func (set *SSet) Clone() *SSet

func (*SSet) Contains

func (set *SSet) Contains(key string) bool

func (*SSet) ContainsAll

func (set *SSet) ContainsAll(keys ...string) bool

func (*SSet) ContainsAny

func (set *SSet) ContainsAny(keys ...string) bool

func (*SSet) CountBy

func (set *SSet) CountBy(f func(string) bool) int

func (*SSet) Difference

func (set *SSet) Difference(another *SSet) *SSet

func (*SSet) DoUntil

func (set *SSet) DoUntil(f func(string) bool) int

func (*SSet) DoUntilError

func (set *SSet) DoUntilError(f func(string) error) error

func (*SSet) DoWhile

func (set *SSet) DoWhile(f func(string) bool) int

func (*SSet) Equal

func (set *SSet) Equal(another *SSet) bool

func (*SSet) Filter

func (set *SSet) Filter(f func(string) bool) *SSet

func (*SSet) FilterMap

func (set *SSet) FilterMap(f interface{}) interface{}

f: func(string) *T

func(string) (T, bool)
func(string) (T, error)

return: []T

func (*SSet) FindBy

func (set *SSet) FindBy(f func(string) bool) *string

func (*SSet) FindLastBy

func (set *SSet) FindLastBy(f func(string) bool) *string

func (*SSet) Fold

func (set *SSet) Fold(init string, f func(string, string) string) string

func (*SSet) ForEach

func (set *SSet) ForEach(f func(string))

func (*SSet) ForEachWithIndex

func (set *SSet) ForEachWithIndex(f func(int, string))

func (*SSet) GroupBy

func (set *SSet) GroupBy(f func(string) interface{}) map[interface{}]*SSet

func (*SSet) GroupByBool

func (set *SSet) GroupByBool(f func(string) bool) (trueGroup *SSet, falseGroup *SSet)

func (*SSet) GroupByInt

func (set *SSet) GroupByInt(f func(string) int) map[int]*SSet

func (*SSet) GroupByStr

func (set *SSet) GroupByStr(f func(string) string) map[string]*SSet

func (*SSet) InPlaceUnion

func (set *SSet) InPlaceUnion(another *SSet)

func (*SSet) Intersect

func (set *SSet) Intersect(another *SSet) *SSet

func (*SSet) IsEmpty

func (set *SSet) IsEmpty() bool

func (*SSet) IsProperSubsetOf

func (set *SSet) IsProperSubsetOf(another *SSet) bool

func (*SSet) IsProperSupersetOf

func (set *SSet) IsProperSupersetOf(another *SSet) bool

func (*SSet) IsSubsetOf

func (set *SSet) IsSubsetOf(another *SSet) bool

func (*SSet) IsSupersetOf

func (set *SSet) IsSupersetOf(another *SSet) bool

func (*SSet) Len

func (set *SSet) Len() int

func (*SSet) Map

func (set *SSet) Map(f interface{}) interface{}

f: func(string) T return: []T

func (SSet) MarshalJSON

func (set SSet) MarshalJSON() ([]byte, error)

func (*SSet) Reduce

func (set *SSet) Reduce(f func(string, string) string) string

func (*SSet) Remove

func (set *SSet) Remove(key string)

func (*SSet) String

func (set *SSet) String() string

func (*SSet) ToSlice

func (set *SSet) ToSlice() []string

func (*SSet) ToSliceRef

func (set *SSet) ToSliceRef() []string

NOTICE: efficient but unsafe

func (*SSet) Union

func (set *SSet) Union(another *SSet) *SSet

func (*SSet) UnmarshalJSON

func (set *SSet) UnmarshalJSON(b []byte) error

type T

type T = t.Time

from renamed imported package derive-set

type TSet

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

func NewTSet

func NewTSet(capacity int) *TSet

func NewTSetFromSlice

func NewTSetFromSlice(items []t.Time) *TSet

func (*TSet) All

func (set *TSet) All(f func(t.Time) bool) bool

func (*TSet) Any

func (set *TSet) Any(f func(t.Time) bool) bool

func (*TSet) Append

func (set *TSet) Append(keys ...t.Time)

func (*TSet) Clear

func (set *TSet) Clear()

func (*TSet) Clone

func (set *TSet) Clone() *TSet

func (*TSet) Contains

func (set *TSet) Contains(key t.Time) bool

func (*TSet) ContainsAll

func (set *TSet) ContainsAll(keys ...t.Time) bool

func (*TSet) ContainsAny

func (set *TSet) ContainsAny(keys ...t.Time) bool

func (*TSet) CountBy

func (set *TSet) CountBy(f func(t.Time) bool) int

func (*TSet) Difference

func (set *TSet) Difference(another *TSet) *TSet

func (*TSet) DoUntilError

func (set *TSet) DoUntilError(f func(t.Time) error) error

func (*TSet) Equal

func (set *TSet) Equal(another *TSet) bool

func (*TSet) Filter

func (set *TSet) Filter(f func(t.Time) bool) *TSet

func (*TSet) FilterMap

func (set *TSet) FilterMap(f interface{}) interface{}

f: func(t.Time) *T

func(t.Time) (T, bool)
func(t.Time) (T, error)

return: []T

func (*TSet) FindBy

func (set *TSet) FindBy(f func(t.Time) bool) *t.Time

func (*TSet) Fold

func (set *TSet) Fold(init t.Time, f func(t.Time, t.Time) t.Time) t.Time

func (*TSet) ForEach

func (set *TSet) ForEach(f func(t.Time))

func (*TSet) GroupBy

func (set *TSet) GroupBy(f func(t.Time) interface{}) map[interface{}]*TSet

func (*TSet) GroupByBool

func (set *TSet) GroupByBool(f func(t.Time) bool) (trueGroup *TSet, falseGroup *TSet)

func (*TSet) GroupByInt

func (set *TSet) GroupByInt(f func(t.Time) int) map[int]*TSet

func (*TSet) GroupByStr

func (set *TSet) GroupByStr(f func(t.Time) string) map[string]*TSet

func (*TSet) InPlaceUnion

func (set *TSet) InPlaceUnion(another *TSet)

func (*TSet) Intersect

func (set *TSet) Intersect(another *TSet) *TSet

func (*TSet) IsEmpty

func (set *TSet) IsEmpty() bool

func (*TSet) IsProperSubsetOf

func (set *TSet) IsProperSubsetOf(another *TSet) bool

func (*TSet) IsProperSupersetOf

func (set *TSet) IsProperSupersetOf(another *TSet) bool

func (*TSet) IsSubsetOf

func (set *TSet) IsSubsetOf(another *TSet) bool

func (*TSet) IsSupersetOf

func (set *TSet) IsSupersetOf(another *TSet) bool

func (*TSet) Len

func (set *TSet) Len() int

func (*TSet) Map

func (set *TSet) Map(f interface{}) interface{}

f: func(t.Time) T return: []T

func (TSet) MarshalJSON

func (set TSet) MarshalJSON() ([]byte, error)

func (*TSet) Reduce

func (set *TSet) Reduce(f func(t.Time, t.Time) t.Time) t.Time

func (*TSet) Remove

func (set *TSet) Remove(key t.Time)

func (*TSet) String

func (set *TSet) String() string

func (*TSet) ToSlice

func (set *TSet) ToSlice() []t.Time

func (*TSet) Union

func (set *TSet) Union(another *TSet) *TSet

func (*TSet) UnmarshalJSON

func (set *TSet) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

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