gitlab.com/evatix-go/core@v1.3.55/coredata/corestr/newLinkedListCollectionsCreator.go (about) 1 package corestr 2 3 type newLinkedListCollectionsCreator struct{} 4 5 func (it *newLinkedListCollectionsCreator) Create() *LinkedCollections { 6 return &LinkedCollections{} 7 } 8 9 func (it *newLinkedListCollectionsCreator) Empty() *LinkedCollections { 10 return &LinkedCollections{} 11 } 12 13 func (it *newLinkedListCollectionsCreator) PointerStringsPtr( 14 stringItems *[]*string, 15 ) *LinkedCollections { 16 if stringItems == nil { 17 return &LinkedCollections{} 18 } 19 20 linkedList := it.Create() 21 22 return linkedList. 23 AddPointerStringsPtr(stringItems) 24 } 25 26 func (it *newLinkedListCollectionsCreator) UsingCollections( 27 collections ...*Collection, 28 ) *LinkedCollections { 29 if collections == nil { 30 return &LinkedCollections{} 31 } 32 33 linkedList := it.Create() 34 35 return linkedList. 36 AppendCollectionsPointers( 37 true, 38 &collections) 39 } 40 41 func (it *newLinkedListCollectionsCreator) StringsPtr( 42 isMakeClone bool, 43 stringItems *[]string, 44 ) *LinkedCollections { 45 if stringItems == nil { 46 return &LinkedCollections{} 47 } 48 49 linkedList := it.Create() 50 51 return linkedList. 52 AddStringsPtr(isMakeClone, stringItems) 53 } 54 55 func (it *newLinkedListCollectionsCreator) StringsOptions( 56 isClone bool, 57 stringItems []string, 58 ) *LinkedCollections { 59 linkedList := &LinkedCollections{} 60 61 if len(stringItems) == 0 { 62 return linkedList 63 } 64 65 return linkedList. 66 AddStringsPtr(isClone, &stringItems) 67 } 68 69 func (it *newLinkedListCollectionsCreator) StringsPtrOptions( 70 isClone bool, 71 stringItems *[]string, 72 ) *LinkedCollections { 73 linkedList := &LinkedCollections{} 74 75 if stringItems == nil || len(*stringItems) == 0 { 76 return linkedList 77 } 78 79 return linkedList. 80 AddStringsPtr(isClone, stringItems) 81 } 82 83 func (it *newLinkedListCollectionsCreator) Strings( 84 stringItems []string, 85 ) *LinkedCollections { 86 linkedList := &LinkedCollections{} 87 88 if len(stringItems) == 0 { 89 return linkedList 90 } 91 92 return linkedList. 93 AddStringsPtr( 94 false, 95 &stringItems) 96 }