corestr

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2021 License: MIT Imports: 9 Imported by: 44

Documentation

Index

Constants

View Source
const (
	RegularCollectionEfficiencyLimit = 1000
	DoubleLimit                      = RegularCollectionEfficiencyLimit * 3

	NoElements = " {No Elements}"
)

Variables

View Source
var (
	StaticEmptyCollection           = *EmptyCollection()
	StaticEmptyCollectionPtr        = &StaticEmptyCollection
	StaticEmptyCharCollectionMap    = *EmptyCharCollectionMap()
	StaticEmptyCharCollectionMapPtr = &StaticEmptyCharCollectionMap
	StaticEmptyCharHashsetMap       = *EmptyCharHashsetMap()
	StaticEmptyCharHashsetMapPtr    = &StaticEmptyCharHashsetMap
	StaticEmptyHashset              = *EmptyHashset()
	StaticEmptyHashsetPtr           = &StaticEmptyHashset
	StaticJsonError                 = msgtype.EmptyResultCannotMakeJson.
									Error(constants.EmptyString, constants.EmptyString)
)

Functions

This section is empty.

Types

type CharCollectionDataModel

type CharCollectionDataModel struct {
	Items                  *map[byte]*Collection `json:"CharacterVsStringsCollectionMap"`
	EachCollectionCapacity int
}

func NewCharCollectionMapDataModelUsing

func NewCharCollectionMapDataModelUsing(dataIn *CharCollectionMap) *CharCollectionDataModel

type CharCollectionMap

type CharCollectionMap struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func EmptyCharCollectionMap

func EmptyCharCollectionMap() *CharCollectionMap

EachCollectionCapacity = 0

func NewCharCollectionMap

func NewCharCollectionMap(
	capacity, selfCollectionCapacity int,
) *CharCollectionMap

CharCollectionMap.EachCollectionCapacity, capacity minimum 10 will be set if lower than 10 is given.

For lower than 5 use the EmptyCharCollectionMap items definition.

func NewCharCollectionMapUsingDataModel

func NewCharCollectionMapUsingDataModel(dataModel *CharCollectionDataModel) *CharCollectionMap

func (*CharCollectionMap) Add

func (charCollectionMap *CharCollectionMap) Add(
	str string,
) *CharCollectionMap

func (*CharCollectionMap) AddCharHashsetMap

func (charCollectionMap *CharCollectionMap) AddCharHashsetMap(
	charHashsetMap *CharHashsetMap,
) *CharCollectionMap

func (*CharCollectionMap) AddCollectionItems

func (charCollectionMap *CharCollectionMap) AddCollectionItems(
	collectionWithDiffStarts *Collection,
) *CharCollectionMap

func (*CharCollectionMap) AddCollectionItemsAsyncLock

func (charCollectionMap *CharCollectionMap) AddCollectionItemsAsyncLock(
	collectionWithDiffStarts *Collection,
	onComplete OnCompleteCharCollectionMap,
) *CharCollectionMap

func (*CharCollectionMap) AddLength

func (charCollectionMap *CharCollectionMap) AddLength(
	lengths ...int,
) *CharCollectionMap

func (*CharCollectionMap) AddLock

func (charCollectionMap *CharCollectionMap) AddLock(
	str string,
) *CharCollectionMap

func (*CharCollectionMap) AddPtrStringsLock

func (charCollectionMap *CharCollectionMap) AddPtrStringsLock(
	simpleStrings *[]*string,
) *CharCollectionMap

func (*CharCollectionMap) AddSameCharsCollection

func (charCollectionMap *CharCollectionMap) AddSameCharsCollection(
	str string,
	stringsWithSameStartChar *Collection,
) *Collection

func (*CharCollectionMap) AddSameCharsCollectionLock

func (charCollectionMap *CharCollectionMap) AddSameCharsCollectionLock(
	str string,
	stringsWithSameStartChar *Collection,
) *Collection

func (*CharCollectionMap) AddSameStartingCharItems

func (charCollectionMap *CharCollectionMap) AddSameStartingCharItems(
	char byte,
	allItemsWithSameChar *[]string,
) *CharCollectionMap

Assuming all items starts with same chars

func (*CharCollectionMap) AddStringPtr

func (charCollectionMap *CharCollectionMap) AddStringPtr(
	str *string,
) *CharCollectionMap

func (*CharCollectionMap) AddStringPtrLock

func (charCollectionMap *CharCollectionMap) AddStringPtrLock(
	str *string,
) *CharCollectionMap

func (*CharCollectionMap) AddStrings

func (charCollectionMap *CharCollectionMap) AddStrings(
	items ...string,
) *CharCollectionMap

func (*CharCollectionMap) AddStringsPtr

func (charCollectionMap *CharCollectionMap) AddStringsPtr(
	items *[]string,
) *CharCollectionMap

func (*CharCollectionMap) AddStringsPtrAsyncLock

func (charCollectionMap *CharCollectionMap) AddStringsPtrAsyncLock(
	largeStringsCollection *[]string,
	onComplete OnCompleteCharCollectionMap,
) *CharCollectionMap

func (*CharCollectionMap) AllLengthsSum

func (charCollectionMap *CharCollectionMap) AllLengthsSum() int

All lengths sum.

func (*CharCollectionMap) AllLengthsSumLock

func (charCollectionMap *CharCollectionMap) AllLengthsSumLock() int

All lengths sum.

func (*CharCollectionMap) GetChar

func (charCollectionMap *CharCollectionMap) GetChar(
	str string,
) byte

func (*CharCollectionMap) GetCharOfPtr

func (charCollectionMap *CharCollectionMap) GetCharOfPtr(
	str *string,
) byte

func (*CharCollectionMap) GetCharsPtrGroups

func (charCollectionMap *CharCollectionMap) GetCharsPtrGroups(
	items *[]string,
) *CharCollectionMap

func (*CharCollectionMap) GetCollection

func (charCollectionMap *CharCollectionMap) GetCollection(
	strFirstChar string,
	isAddNewOnEmpty bool,
) *Collection

func (*CharCollectionMap) GetCollectionByChar

func (charCollectionMap *CharCollectionMap) GetCollectionByChar(
	char byte,
) *Collection

func (*CharCollectionMap) GetCollectionLock

func (charCollectionMap *CharCollectionMap) GetCollectionLock(
	strFirstChar string,
	isAddNewOnEmpty bool,
) *Collection

func (*CharCollectionMap) GetCopyMapLock

func (charCollectionMap *CharCollectionMap) GetCopyMapLock() *map[byte]*Collection

Sends a copy of items

func (*CharCollectionMap) GetMap

func (charCollectionMap *CharCollectionMap) GetMap() *map[byte]*Collection

func (*CharCollectionMap) Has

func (charCollectionMap *CharCollectionMap) Has(
	str string,
) bool

func (*CharCollectionMap) HasWithCollection

func (charCollectionMap *CharCollectionMap) HasWithCollection(
	str string,
) (bool, *Collection)

func (*CharCollectionMap) HasWithCollectionLock

func (charCollectionMap *CharCollectionMap) HasWithCollectionLock(
	str string,
) (bool, *Collection)

func (*CharCollectionMap) HashsetByChar

func (charCollectionMap *CharCollectionMap) HashsetByChar(
	char byte,
) *Hashset

func (*CharCollectionMap) HashsetByCharLock

func (charCollectionMap *CharCollectionMap) HashsetByCharLock(
	char byte,
) *Hashset

func (*CharCollectionMap) HashsetByStringFirstChar

func (charCollectionMap *CharCollectionMap) HashsetByStringFirstChar(
	str string,
) *Hashset

func (*CharCollectionMap) HashsetByStringFirstCharLock

func (charCollectionMap *CharCollectionMap) HashsetByStringFirstCharLock(
	str string,
) *Hashset

func (*CharCollectionMap) HashsetsCollection

func (charCollectionMap *CharCollectionMap) HashsetsCollection() *HashsetsCollection

func (*CharCollectionMap) HashsetsCollectionByChars

func (charCollectionMap *CharCollectionMap) HashsetsCollectionByChars(
	chars ...byte,
) *HashsetsCollection

func (*CharCollectionMap) HashsetsCollectionByStringFirstChar

func (charCollectionMap *CharCollectionMap) HashsetsCollectionByStringFirstChar(
	stringItems ...string,
) *HashsetsCollection

func (*CharCollectionMap) IsEmpty

func (charCollectionMap *CharCollectionMap) IsEmpty() bool

func (*CharCollectionMap) IsEmptyLock

func (charCollectionMap *CharCollectionMap) IsEmptyLock() bool

func (*CharCollectionMap) IsEqualsPtr

func (charCollectionMap *CharCollectionMap) IsEqualsPtr(
	another *CharCollectionMap,
) bool

func (*CharCollectionMap) IsEqualsPtrLock

func (charCollectionMap *CharCollectionMap) IsEqualsPtrLock(
	another *CharCollectionMap,
) bool

func (*CharCollectionMap) IsEqualsWithCaseSensitivityPtr

func (charCollectionMap *CharCollectionMap) IsEqualsWithCaseSensitivityPtr(
	another *CharCollectionMap,
	isCaseSensitive bool,
) bool

func (*CharCollectionMap) IsEqualsWithCaseSensitivityPtrLock

func (charCollectionMap *CharCollectionMap) IsEqualsWithCaseSensitivityPtrLock(
	another *CharCollectionMap,
	isCaseSensitive bool,
) bool

func (*CharCollectionMap) Json

func (charCollectionMap *CharCollectionMap) Json() *JsonResult

func (*CharCollectionMap) JsonModel

func (charCollectionMap *CharCollectionMap) JsonModel() *CharCollectionDataModel

func (*CharCollectionMap) Length

func (charCollectionMap *CharCollectionMap) Length() int

Returns the length of chars which is the map length.

func (*CharCollectionMap) LengthLock

func (charCollectionMap *CharCollectionMap) LengthLock() int

func (*CharCollectionMap) LengthOf

func (charCollectionMap *CharCollectionMap) LengthOf(char byte) int

func (*CharCollectionMap) LengthOfCollectionFromFirstChar

func (charCollectionMap *CharCollectionMap) LengthOfCollectionFromFirstChar(
	str string,
) int

Get the char of the string given and get the length of how much is there.

func (*CharCollectionMap) LengthOfLock

func (charCollectionMap *CharCollectionMap) LengthOfLock(char byte) int

func (*CharCollectionMap) List

func (charCollectionMap *CharCollectionMap) List() *[]string

func (*CharCollectionMap) ListLock

func (charCollectionMap *CharCollectionMap) ListLock() *[]string

func (*CharCollectionMap) MarshalJSON

func (charCollectionMap *CharCollectionMap) MarshalJSON() ([]byte, error)

func (*CharCollectionMap) ParseInjectUsingJson

func (charCollectionMap *CharCollectionMap) ParseInjectUsingJson(
	jsonResult *JsonResult,
) (*CharCollectionMap, error)

func (*CharCollectionMap) ParseInjectUsingJsonMust

func (charCollectionMap *CharCollectionMap) ParseInjectUsingJsonMust(
	jsonResult *JsonResult,
) *CharCollectionMap

Panic if error

func (*CharCollectionMap) Print

func (charCollectionMap *CharCollectionMap) Print(isPrint bool)

func (*CharCollectionMap) PrintLock

func (charCollectionMap *CharCollectionMap) PrintLock(isPrint bool)

func (*CharCollectionMap) Resize

func (charCollectionMap *CharCollectionMap) Resize(
	newLength int,
) *CharCollectionMap

func (*CharCollectionMap) String

func (charCollectionMap *CharCollectionMap) String() string

func (*CharCollectionMap) StringLock

func (charCollectionMap *CharCollectionMap) StringLock() string

func (*CharCollectionMap) SummaryString

func (charCollectionMap *CharCollectionMap) SummaryString() string

func (*CharCollectionMap) SummaryStringLock

func (charCollectionMap *CharCollectionMap) SummaryStringLock() string

func (*CharCollectionMap) UnmarshalJSON

func (charCollectionMap *CharCollectionMap) UnmarshalJSON(data []byte) error

type CharHashsetMap

type CharHashsetMap struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func EmptyCharHashsetMap

func EmptyCharHashsetMap() *CharHashsetMap

selfHashsetCapacity = 0

func NewCharHashsetMap

func NewCharHashsetMap(
	capacity, selfHashsetCapacity int,
) *CharHashsetMap

CharHashsetMap.selfHashsetCapacity, capacity minimum 10 will be set if lower than 10 is given.

For lower than 5 use the EmptyCharHashsetMap hashset definition.

func (*CharHashsetMap) Add

func (charHashsetMap *CharHashsetMap) Add(
	str string,
) *CharHashsetMap

func (*CharHashsetMap) AddCharCollectionMapItems

func (charHashsetMap *CharHashsetMap) AddCharCollectionMapItems(
	charCollectionMap *CharCollectionMap,
) *CharHashsetMap

func (*CharHashsetMap) AddCollectionItems

func (charHashsetMap *CharHashsetMap) AddCollectionItems(
	collectionWithDiffStarts *Collection,
) *CharHashsetMap

func (*CharHashsetMap) AddCollectionItemsAsyncLock

func (charHashsetMap *CharHashsetMap) AddCollectionItemsAsyncLock(
	collectionWithDiffStarts *Collection,
	onComplete OnCompleteCharHashsetMap,
) *CharHashsetMap

func (*CharHashsetMap) AddHashsetItems

func (charHashsetMap *CharHashsetMap) AddHashsetItems(
	hashsetWithDiffStarts *Hashset,
) *CharHashsetMap

func (*CharHashsetMap) AddHashsetItemsAsyncLock

func (charHashsetMap *CharHashsetMap) AddHashsetItemsAsyncLock(
	hashsetWithDiffStarts *Hashset,
	onComplete OnCompleteCharHashsetMap,
) *CharHashsetMap

func (*CharHashsetMap) AddHashsetLock

func (charHashsetMap *CharHashsetMap) AddHashsetLock(
	str string,
	stringsWithSameStartChar *Hashset,
) *Hashset

func (*CharHashsetMap) AddLock

func (charHashsetMap *CharHashsetMap) AddLock(
	str string,
) *CharHashsetMap

func (*CharHashsetMap) AddPtrStringsLock

func (charHashsetMap *CharHashsetMap) AddPtrStringsLock(
	simpleStrings *[]*string,
) *CharHashsetMap

func (*CharHashsetMap) AddSameCharsCollection

func (charHashsetMap *CharHashsetMap) AddSameCharsCollection(
	str string,
	stringsWithSameStartChar *Collection,
) *Hashset

func (*CharHashsetMap) AddSameCharsCollectionLock

func (charHashsetMap *CharHashsetMap) AddSameCharsCollectionLock(
	str string,
	stringsWithSameStartChar *Collection,
) *Hashset

func (*CharHashsetMap) AddSameCharsHashset

func (charHashsetMap *CharHashsetMap) AddSameCharsHashset(
	str string,
	stringsWithSameStartChar *Hashset,
) *Hashset

func (*CharHashsetMap) AddSameStartingCharItems

func (charHashsetMap *CharHashsetMap) AddSameStartingCharItems(
	char byte,
	allItemsWithSameChar *[]string,
) *CharHashsetMap

Assuming all items starts with same chars

func (*CharHashsetMap) AddStringPtr

func (charHashsetMap *CharHashsetMap) AddStringPtr(
	str *string,
) *CharHashsetMap

func (*CharHashsetMap) AddStringPtrLock

func (charHashsetMap *CharHashsetMap) AddStringPtrLock(
	str *string,
) *CharHashsetMap

func (*CharHashsetMap) AddStrings

func (charHashsetMap *CharHashsetMap) AddStrings(
	items ...string,
) *CharHashsetMap

func (*CharHashsetMap) AddStringsPtr

func (charHashsetMap *CharHashsetMap) AddStringsPtr(
	items *[]string,
) *CharHashsetMap

func (*CharHashsetMap) AddStringsPtrAsyncLock

func (charHashsetMap *CharHashsetMap) AddStringsPtrAsyncLock(
	largeStringsHashset *[]string,
	onComplete OnCompleteCharHashsetMap,
) *CharHashsetMap

func (*CharHashsetMap) AllLengthsSum

func (charHashsetMap *CharHashsetMap) AllLengthsSum() int

All lengths sum.

func (*CharHashsetMap) AllLengthsSumLock

func (charHashsetMap *CharHashsetMap) AllLengthsSumLock() int

All lengths sum.

func (*CharHashsetMap) GetChar

func (charHashsetMap *CharHashsetMap) GetChar(
	str string,
) byte

func (*CharHashsetMap) GetCharOfPtr

func (charHashsetMap *CharHashsetMap) GetCharOfPtr(
	str *string,
) byte

func (*CharHashsetMap) GetCharsPtrGroups

func (charHashsetMap *CharHashsetMap) GetCharsPtrGroups(
	items *[]string,
) *CharHashsetMap

func (*CharHashsetMap) GetCopyMapLock

func (charHashsetMap *CharHashsetMap) GetCopyMapLock() *map[byte]*Hashset

Sends a copy of items

func (*CharHashsetMap) GetHashset

func (charHashsetMap *CharHashsetMap) GetHashset(
	strFirstChar string,
	isAddNewOnEmpty bool,
) *Hashset

func (*CharHashsetMap) GetHashsetByChar

func (charHashsetMap *CharHashsetMap) GetHashsetByChar(
	char byte,
) *Hashset

func (*CharHashsetMap) GetHashsetLock

func (charHashsetMap *CharHashsetMap) GetHashsetLock(
	strFirstChar string,
	isAddNewOnEmpty bool,
) *Hashset

func (*CharHashsetMap) GetMap

func (charHashsetMap *CharHashsetMap) GetMap() *map[byte]*Hashset

func (*CharHashsetMap) Has

func (charHashsetMap *CharHashsetMap) Has(
	str string,
) bool

func (*CharHashsetMap) HasWithHashset

func (charHashsetMap *CharHashsetMap) HasWithHashset(
	str string,
) (bool, *Hashset)

func (*CharHashsetMap) HasWithHashsetLock

func (charHashsetMap *CharHashsetMap) HasWithHashsetLock(
	str string,
) (bool, *Hashset)

func (*CharHashsetMap) HashsetByChar

func (charHashsetMap *CharHashsetMap) HashsetByChar(
	char byte,
) *Hashset

func (*CharHashsetMap) HashsetByCharLock

func (charHashsetMap *CharHashsetMap) HashsetByCharLock(
	char byte,
) *Hashset

func (*CharHashsetMap) HashsetByStringFirstChar

func (charHashsetMap *CharHashsetMap) HashsetByStringFirstChar(
	str string,
) *Hashset

func (*CharHashsetMap) HashsetByStringFirstCharLock

func (charHashsetMap *CharHashsetMap) HashsetByStringFirstCharLock(
	str string,
) *Hashset

func (*CharHashsetMap) HashsetsCollection

func (charHashsetMap *CharHashsetMap) HashsetsCollection() *HashsetsCollection

func (*CharHashsetMap) HashsetsCollectionByChars

func (charHashsetMap *CharHashsetMap) HashsetsCollectionByChars(
	chars ...byte,
) *HashsetsCollection

func (*CharHashsetMap) HashsetsCollectionByStringsFirstChar

func (charHashsetMap *CharHashsetMap) HashsetsCollectionByStringsFirstChar(
	stringItems ...string,
) *HashsetsCollection

func (*CharHashsetMap) IsEmpty

func (charHashsetMap *CharHashsetMap) IsEmpty() bool

func (*CharHashsetMap) IsEmptyLock

func (charHashsetMap *CharHashsetMap) IsEmptyLock() bool

func (*CharHashsetMap) IsEqualsPtr

func (charHashsetMap *CharHashsetMap) IsEqualsPtr(
	another *CharHashsetMap,
) bool

func (*CharHashsetMap) IsEqualsPtrLock

func (charHashsetMap *CharHashsetMap) IsEqualsPtrLock(
	another *CharHashsetMap,
) bool

func (*CharHashsetMap) Length

func (charHashsetMap *CharHashsetMap) Length() int

func (*CharHashsetMap) LengthLock

func (charHashsetMap *CharHashsetMap) LengthLock() int

func (*CharHashsetMap) LengthOf

func (charHashsetMap *CharHashsetMap) LengthOf(char byte) int

func (*CharHashsetMap) LengthOfHashsetFromFirstChar

func (charHashsetMap *CharHashsetMap) LengthOfHashsetFromFirstChar(
	str string,
) int

Get the char of the string given and get the length of how much is there.

func (*CharHashsetMap) LengthOfLock

func (charHashsetMap *CharHashsetMap) LengthOfLock(char byte) int

func (*CharHashsetMap) Print

func (charHashsetMap *CharHashsetMap) Print(isPrint bool)

func (*CharHashsetMap) PrintLock

func (charHashsetMap *CharHashsetMap) PrintLock(isPrint bool)

func (*CharHashsetMap) String

func (charHashsetMap *CharHashsetMap) String() string

func (*CharHashsetMap) StringLock

func (charHashsetMap *CharHashsetMap) StringLock() string

func (*CharHashsetMap) SummaryString

func (charHashsetMap *CharHashsetMap) SummaryString() string

func (*CharHashsetMap) SummaryStringLock

func (charHashsetMap *CharHashsetMap) SummaryStringLock() string

type Collection

type Collection struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func EmptyCollection

func EmptyCollection() *Collection

func NewCollection

func NewCollection(capacity int) *Collection

func NewCollectionDataModelUsingDataModel

func NewCollectionDataModelUsingDataModel(dataModel *CollectionDataModel) *Collection

func NewCollectionUsingLength

func NewCollectionUsingLength(len, capacity int) *Collection

func NewCollectionUsingStrings

func NewCollectionUsingStrings(stringItems *[]string) *Collection

func (*Collection) Add

func (collection *Collection) Add(str string) *Collection

func (*Collection) AddCapacity

func (collection *Collection) AddCapacity(
	capacities ...int,
) *Collection

func (*Collection) AddLock

func (collection *Collection) AddLock(str string) *Collection

func (*Collection) AddPtr

func (collection *Collection) AddPtr(str *string) *Collection

func (*Collection) AddPtrLock

func (collection *Collection) AddPtrLock(str *string) *Collection

func (*Collection) AddStringsPtr

func (collection *Collection) AddStringsPtr(str *[]string) *Collection

func (*Collection) AddStringsPtrWgLock

func (collection *Collection) AddStringsPtrWgLock(
	str *[]string,
	group *sync.WaitGroup,
) *Collection

func (*Collection) AddWithWgLock

func (collection *Collection) AddWithWgLock(
	str string,
	group *sync.WaitGroup,
) *Collection

func (*Collection) Adds

func (collection *Collection) Adds(items ...string) *Collection

func (*Collection) AddsLock

func (collection *Collection) AddsLock(items ...string) *Collection

func (*Collection) AddsNonEmptyPtr

func (collection *Collection) AddsNonEmptyPtr(itemsPtr ...*string) *Collection

func (*Collection) AddsNonEmptyPtrLock

func (collection *Collection) AddsNonEmptyPtrLock(itemsPtr ...*string) *Collection

func (*Collection) AddsPtr

func (collection *Collection) AddsPtr(itemsPtr ...*string) *Collection

Skip on nil

func (*Collection) AddsPtrLock

func (collection *Collection) AddsPtrLock(itemsPtr ...*string) *Collection

func (*Collection) AppendAnys

func (collection *Collection) AppendAnys(anys ...interface{}) *Collection

Continue on nil

func (*Collection) AppendAnysLock

func (collection *Collection) AppendAnysLock(anys ...interface{}) *Collection

Continue on nil

func (*Collection) AppendAnysUsingFilter

func (collection *Collection) AppendAnysUsingFilter(
	filter IsStringFilter,
	anys ...interface{},
) *Collection

Skip on nil

func (*Collection) AppendAnysUsingFilterLock

func (collection *Collection) AppendAnysUsingFilterLock(
	filter IsStringFilter,
	anys ...interface{},
) *Collection

Skip on nil

func (*Collection) AppendCollection

func (collection *Collection) AppendCollection(
	anotherCollection Collection,
) *Collection

func (*Collection) AppendCollectionPtr

func (collection *Collection) AppendCollectionPtr(
	anotherCollection *Collection,
) *Collection

func (*Collection) AppendCollectionsPtr

func (collection *Collection) AppendCollectionsPtr(
	anotherCollectionsPtr ...*Collection,
) *Collection

func (*Collection) AppendNonEmptyAnys

func (collection *Collection) AppendNonEmptyAnys(anys ...interface{}) *Collection

Continue on nil

func (*Collection) Capacity

func (collection *Collection) Capacity() int

func (*Collection) CharCollectionMap

func (collection *Collection) CharCollectionMap() *CharCollectionMap

func (*Collection) Filter

func (collection *Collection) Filter(filter IsStringFilter) *[]string

must return a slice

func (*Collection) FilterLock

func (collection *Collection) FilterLock(filter IsStringFilter) *[]string

must return a slice

func (*Collection) FilterPtr

func (collection *Collection) FilterPtr(filterPtr IsStringPointerFilter) *[]*string

must return a slice

func (*Collection) FilterPtrLock

func (collection *Collection) FilterPtrLock(filterPtr IsStringPointerFilter) *[]*string

must return a slice

func (*Collection) FilteredCollection

func (collection *Collection) FilteredCollection(filter IsStringFilter) *Collection

must return a items

func (*Collection) FilteredCollectionLock

func (collection *Collection) FilteredCollectionLock(filter IsStringFilter) *Collection

must return a items

func (*Collection) GetHashsetPlusHasAll

func (collection *Collection) GetHashsetPlusHasAll(items *[]string) (*Hashset, bool)

nil will return false.

func (*Collection) Has

func (collection *Collection) Has(str string) bool

func (*Collection) HasAll

func (collection *Collection) HasAll(items ...string) bool

func (*Collection) HasLock

func (collection *Collection) HasLock(str string) bool

func (*Collection) HasUsingSensitivity

func (collection *Collection) HasUsingSensitivity(str string, isCaseSensitive bool) bool

func (*Collection) Hashset

func (collection *Collection) Hashset() *Hashset

func (*Collection) HashsetLock

func (collection *Collection) HashsetLock() *Hashset

func (*Collection) IsContainsAll

func (collection *Collection) IsContainsAll(items ...string) bool

nil will return false.

func (*Collection) IsContainsAllLock

func (collection *Collection) IsContainsAllLock(items ...string) bool

nil will return false.

func (*Collection) IsContainsAllPtr

func (collection *Collection) IsContainsAllPtr(items *[]string) bool

nil will return false.

func (*Collection) IsContainsPtr

func (collection *Collection) IsContainsPtr(item *string) bool

func (*Collection) IsEmpty

func (collection *Collection) IsEmpty() bool

func (*Collection) IsEmptyLock

func (collection *Collection) IsEmptyLock() bool

func (*Collection) IsEquals

func (collection *Collection) IsEquals(
	anotherCollection Collection,
) bool

func (*Collection) IsEqualsPtr

func (collection *Collection) IsEqualsPtr(
	anotherCollection *Collection,
) bool

func (*Collection) IsEqualsWithSensitivePtr

func (collection *Collection) IsEqualsWithSensitivePtr(
	anotherCollection *Collection,
	isCaseSensitive bool,
) bool

func (*Collection) Join

func (collection *Collection) Join(
	separator string,
) string

func (*Collection) Joins

func (collection *Collection) Joins(
	separator string,
	items ...string,
) string

func (*Collection) Json

func (collection *Collection) Json() *JsonResult

func (*Collection) JsonModel

func (collection *Collection) JsonModel() *CollectionDataModel

func (*Collection) Length

func (collection *Collection) Length() int

func (*Collection) LengthLock

func (collection *Collection) LengthLock() int

func (*Collection) List

func (collection *Collection) List() []string

func (*Collection) ListCopyPtrLock

func (collection *Collection) ListCopyPtrLock() *[]string

returns a copy of the items

must return a slice

func (*Collection) ListPtr

func (collection *Collection) ListPtr() *[]string

direct return pointer

func (*Collection) MarshalJSON

func (collection *Collection) MarshalJSON() ([]byte, error)

func (*Collection) NonEmptyListPtr

func (collection *Collection) NonEmptyListPtr() *[]string

must return a slice

func (*Collection) ParseInjectUsingJson

func (collection *Collection) ParseInjectUsingJson(
	jsonResult *JsonResult,
) (*Collection, error)

func (*Collection) ParseInjectUsingJsonMust

func (collection *Collection) ParseInjectUsingJsonMust(
	jsonResult *JsonResult,
) *Collection

Panic if error

func (*Collection) Resize

func (collection *Collection) Resize(
	newCapacity int,
) *Collection

Only resize if capacity is bigger than the current one

func (*Collection) Sorted

func (collection *Collection) Sorted() *Collection

func (*Collection) SortedLock

func (collection *Collection) SortedLock() *Collection

func (*Collection) String

func (collection *Collection) String() string

func (*Collection) StringLock

func (collection *Collection) StringLock() string

func (*Collection) UniqueBoolMap

func (collection *Collection) UniqueBoolMap() *map[string]bool

func (*Collection) UniqueBoolMapLock

func (collection *Collection) UniqueBoolMapLock() *map[string]bool

func (*Collection) UniqueList

func (collection *Collection) UniqueList() []string

func (*Collection) UniqueListLock

func (collection *Collection) UniqueListLock() []string

func (*Collection) UniqueListPtr

func (collection *Collection) UniqueListPtr() *[]string

func (*Collection) UniqueListPtrLock

func (collection *Collection) UniqueListPtrLock() *[]string

func (*Collection) UnmarshalJSON

func (collection *Collection) UnmarshalJSON(data []byte) error

type CollectionDataModel

type CollectionDataModel struct {
	Items *[]string `json:"StringsCollection"`
}

func NewCollectionDataModelUsing

func NewCollectionDataModelUsing(collection *Collection) *CollectionDataModel

type Hashset

type Hashset struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func EmptyHashset

func EmptyHashset() *Hashset

func NewHashset

func NewHashset(length int) *Hashset

func NewHashsetUsingCollection

func NewHashsetUsingCollection(collection *Collection) *Hashset

func NewHashsetUsingDataModel

func NewHashsetUsingDataModel(dataModel *HashsetDataModel) *Hashset

func NewHashsetUsingMap

func NewHashsetUsingMap(mapString *map[string]bool) *Hashset

func NewHashsetUsingStrings

func NewHashsetUsingStrings(inputArray *[]string) *Hashset

func NewHashsetWithValues

func NewHashsetWithValues(items ...string) *Hashset

func NewUsingStringPointersArray

func NewUsingStringPointersArray(inputArray *[]*string) *Hashset

func (*Hashset) Add

func (hashset *Hashset) Add(key string) *Hashset

func (*Hashset) AddCollection

func (hashset *Hashset) AddCollection(
	collection *Collection,
) *Hashset

func (*Hashset) AddCollections

func (hashset *Hashset) AddCollections(
	collections ...*Collection,
) *Hashset

func (*Hashset) AddHashsetItems

func (hashset *Hashset) AddHashsetItems(
	hashsetAdd *Hashset,
) *Hashset

func (*Hashset) AddHashsetWgLock

func (hashset *Hashset) AddHashsetWgLock(
	hashsetAdd *Hashset, wg *sync.WaitGroup,
) *Hashset

func (*Hashset) AddLock

func (hashset *Hashset) AddLock(key string) *Hashset

func (*Hashset) AddPtr

func (hashset *Hashset) AddPtr(key *string) *Hashset

func (*Hashset) AddPtrLock

func (hashset *Hashset) AddPtrLock(key *string) *Hashset

func (*Hashset) AddStringsPtr

func (hashset *Hashset) AddStringsPtr(keys *[]string) *Hashset

func (*Hashset) AddStringsPtrLock

func (hashset *Hashset) AddStringsPtrLock(keys *[]string) *Hashset

func (*Hashset) AddStringsPtrWgLock

func (hashset *Hashset) AddStringsPtrWgLock(keys *[]string, wg *sync.WaitGroup) *Hashset

func (*Hashset) AddWithWgLock

func (hashset *Hashset) AddWithWgLock(key string, group *sync.WaitGroup) *Hashset

func (*Hashset) Adds

func (hashset *Hashset) Adds(keys ...string) *Hashset

func (*Hashset) AddsAnyUsingFilter

func (hashset *Hashset) AddsAnyUsingFilter(
	filter IsStringFilter,
	anys ...interface{},
) *Hashset

func (*Hashset) AddsAnyUsingFilterLock

func (hashset *Hashset) AddsAnyUsingFilterLock(
	filter IsStringFilter,
	anys ...interface{},
) *Hashset

func (*Hashset) AddsUsingFilter

func (hashset *Hashset) AddsUsingFilter(
	filter IsStringFilter,
	keys ...string,
) *Hashset

func (*Hashset) Collection

func (hashset *Hashset) Collection() *Collection

func (*Hashset) GetFilteredCollection

func (hashset *Hashset) GetFilteredCollection(
	filter IsStringFilter,
) *Collection

must return items.

func (*Hashset) GetFilteredItems

func (hashset *Hashset) GetFilteredItems(
	filter IsStringFilter,
) *[]string

must return slice.

func (*Hashset) Has

func (hashset *Hashset) Has(key string) bool

func (*Hashset) HasAll

func (hashset *Hashset) HasAll(keys ...string) bool

func (*Hashset) HasAllCollectionItems

func (hashset *Hashset) HasAllCollectionItems(collection *Collection) bool

return false on items is nil or empty.

func (*Hashset) HasAllStringsPtr

func (hashset *Hashset) HasAllStringsPtr(keys *[]string) bool

func (*Hashset) HasAny

func (hashset *Hashset) HasAny(keys ...string) bool

func (*Hashset) HasLock

func (hashset *Hashset) HasLock(key string) bool

func (*Hashset) HasWithLock

func (hashset *Hashset) HasWithLock(key string) bool

func (*Hashset) IsEmpty

func (hashset *Hashset) IsEmpty() bool

func (*Hashset) IsEmptyLock

func (hashset *Hashset) IsEmptyLock() bool

func (*Hashset) IsEquals

func (hashset *Hashset) IsEquals(another Hashset) bool

func (*Hashset) IsEqualsPtr

func (hashset *Hashset) IsEqualsPtr(another *Hashset) bool

func (*Hashset) IsEqualsPtrLock

func (hashset *Hashset) IsEqualsPtrLock(another *Hashset) bool

func (*Hashset) Items

func (hashset *Hashset) Items() *map[string]bool

func (*Hashset) Join

func (hashset *Hashset) Join(
	separator string,
) string

func (*Hashset) Json

func (hashset *Hashset) Json() *JsonResult

func (*Hashset) JsonModel

func (hashset *Hashset) JsonModel() *HashsetDataModel

func (*Hashset) Length

func (hashset *Hashset) Length() int

func (*Hashset) LengthLock

func (hashset *Hashset) LengthLock() int

func (*Hashset) List

func (hashset *Hashset) List() []string

func (*Hashset) ListCopyPtrLock

func (hashset *Hashset) ListCopyPtrLock() *[]string

a slice must returned

func (*Hashset) ListPtr

func (hashset *Hashset) ListPtr() *[]string

func (*Hashset) MarshalJSON

func (hashset *Hashset) MarshalJSON() ([]byte, error)

func (*Hashset) ParseInjectUsingJson

func (hashset *Hashset) ParseInjectUsingJson(
	jsonResult *JsonResult,
) (*Hashset, error)

It will not update the self but creates a new one.

func (*Hashset) ParseInjectUsingJsonMust

func (hashset *Hashset) ParseInjectUsingJsonMust(
	jsonResult *JsonResult,
) *Hashset

Panic if error

func (*Hashset) Remove

func (hashset *Hashset) Remove(key string) *Hashset

func (*Hashset) RemoveWithLock

func (hashset *Hashset) RemoveWithLock(key string) *Hashset

func (*Hashset) String

func (hashset *Hashset) String() string

func (*Hashset) StringLock

func (hashset *Hashset) StringLock() string

func (*Hashset) ToLowerSet

func (hashset *Hashset) ToLowerSet() *Hashset

Create a new items with all lower strings

func (*Hashset) UnmarshalJSON

func (hashset *Hashset) UnmarshalJSON(data []byte) error

type HashsetDataModel

type HashsetDataModel struct {
	Items *map[string]bool `json:"Hashset"`
}

func NewHashsetsDataModelUsing

func NewHashsetsDataModelUsing(collection *Hashset) *HashsetDataModel

type HashsetsCollection

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

func EmptyHashsetsCollection

func EmptyHashsetsCollection() *HashsetsCollection

func NewHashsetsCollection

func NewHashsetsCollection(hashsets *[]Hashset) *HashsetsCollection

func NewHashsetsCollectionUsingDataModel

func NewHashsetsCollectionUsingDataModel(dataModel *HashsetsCollectionDataModel) *HashsetsCollection

func NewHashsetsCollectionUsingLength

func NewHashsetsCollectionUsingLength(len, capacity int) *HashsetsCollection

func NewHashsetsCollectionUsingPointerHashsets

func NewHashsetsCollectionUsingPointerHashsets(hashsets *[]*Hashset) *HashsetsCollection

func (*HashsetsCollection) Add

func (hashsetsCollection *HashsetsCollection) Add(hashset *Hashset) *HashsetsCollection

func (*HashsetsCollection) AddNonEmpty

func (hashsetsCollection *HashsetsCollection) AddNonEmpty(
	hashset *Hashset,
) *HashsetsCollection

func (*HashsetsCollection) AddNonNil

func (hashsetsCollection *HashsetsCollection) AddNonNil(hashset *Hashset) *HashsetsCollection

func (*HashsetsCollection) Adds

func (hashsetsCollection *HashsetsCollection) Adds(
	hashsets ...*Hashset,
) *HashsetsCollection

nil will be skipped

func (*HashsetsCollection) HasAll

func (hashsetsCollection *HashsetsCollection) HasAll(items ...string) bool

items returns false hashsetsCollection empty returns false

func (*HashsetsCollection) IndexOf

func (hashsetsCollection *HashsetsCollection) IndexOf(index int) *Hashset

func (*HashsetsCollection) IsEmpty

func (hashsetsCollection *HashsetsCollection) IsEmpty() bool

func (*HashsetsCollection) IsEqual

func (hashsetsCollection *HashsetsCollection) IsEqual(another HashsetsCollection) bool

func (*HashsetsCollection) IsEqualPtr

func (hashsetsCollection *HashsetsCollection) IsEqualPtr(another *HashsetsCollection) bool

func (*HashsetsCollection) Join

func (hashsetsCollection *HashsetsCollection) Join(
	separator string,
) string

func (*HashsetsCollection) Json

func (hashsetsCollection *HashsetsCollection) Json() *JsonResult

func (*HashsetsCollection) JsonModel

func (hashsetsCollection *HashsetsCollection) JsonModel() *HashsetsCollectionDataModel

func (*HashsetsCollection) Length

func (hashsetsCollection *HashsetsCollection) Length() int

func (*HashsetsCollection) List

func (hashsetsCollection *HashsetsCollection) List() []*Hashset

func (*HashsetsCollection) ListDirectPtr

func (hashsetsCollection *HashsetsCollection) ListDirectPtr() *[]Hashset

func (*HashsetsCollection) ListPtr

func (hashsetsCollection *HashsetsCollection) ListPtr() *[]*Hashset

func (*HashsetsCollection) MarshalJSON

func (hashsetsCollection *HashsetsCollection) MarshalJSON() ([]byte, error)

func (*HashsetsCollection) ParseInjectUsingJson

func (hashsetsCollection *HashsetsCollection) ParseInjectUsingJson(
	jsonResult *JsonResult,
) (*HashsetsCollection, error)

func (*HashsetsCollection) ParseInjectUsingJsonMust

func (hashsetsCollection *HashsetsCollection) ParseInjectUsingJsonMust(
	jsonResult *JsonResult,
) *HashsetsCollection

Panic if error

func (*HashsetsCollection) String

func (hashsetsCollection *HashsetsCollection) String() string

func (*HashsetsCollection) StringsList

func (hashsetsCollection *HashsetsCollection) StringsList() *[]string

func (*HashsetsCollection) UnmarshalJSON

func (hashsetsCollection *HashsetsCollection) UnmarshalJSON(
	data []byte,
) error

type HashsetsCollectionDataModel

type HashsetsCollectionDataModel struct {
	Items *[]*Hashset `json:"HashsetsCollections"`
}

func NewHashsetsCollectionDataModelUsing

func NewHashsetsCollectionDataModelUsing(collection *HashsetsCollection) *HashsetsCollectionDataModel

type IsStringFilter

type IsStringFilter func(str string) (result string, isKeep bool)

type IsStringPointerFilter

type IsStringPointerFilter func(stringPointer *string) (result *string, isKeep bool)

type JsonResult

type JsonResult struct {
	Bytes *[]byte
	Error error
	// contains filtered or unexported fields
}

func EmptyJsonResult

func EmptyJsonResult(err error) JsonResult

func EmptyJsonResultPtr

func EmptyJsonResultPtr(err error) *JsonResult

func EmptyJsonResultWithoutErrorPtr

func EmptyJsonResultWithoutErrorPtr() *JsonResult

func NewJsonResult

func NewJsonResult(jsonBytes []byte, err error) JsonResult

func NewJsonResultBytes

func NewJsonResultBytes(jsonBytes *[]byte) JsonResult

func NewJsonResultBytesPtr

func NewJsonResultBytesPtr(jsonBytes *[]byte) *JsonResult

func NewJsonResultPtr

func NewJsonResultPtr(jsonBytes []byte, err error) *JsonResult

func (*JsonResult) HandleError

func (jsonResult *JsonResult) HandleError()

func (*JsonResult) HandleErrorWithMsg

func (jsonResult *JsonResult) HandleErrorWithMsg(msg string)

func (*JsonResult) HasBytes

func (jsonResult *JsonResult) HasBytes() bool

func (*JsonResult) HasError

func (jsonResult *JsonResult) HasError() bool

func (*JsonResult) HasJson

func (jsonResult *JsonResult) HasJson() bool

func (*JsonResult) IsBytesEmpty

func (jsonResult *JsonResult) IsBytesEmpty() bool

func (*JsonResult) IsEmptyError

func (jsonResult *JsonResult) IsEmptyError() bool

func (*JsonResult) IsEmptyJson

func (jsonResult *JsonResult) IsEmptyJson() bool

func (*JsonResult) JsonString

func (jsonResult *JsonResult) JsonString() string

func (*JsonResult) JsonStringPtr

func (jsonResult *JsonResult) JsonStringPtr() *string

type OnCompleteCharCollectionMap

type OnCompleteCharCollectionMap func(charCollection *CharCollectionMap)

type OnCompleteCharHashsetMap

type OnCompleteCharHashsetMap func(charHashset *CharHashsetMap)

Jump to

Keyboard shortcuts

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