gitlab.com/evatix-go/core@v1.3.55/coreinstruction/NameListCollection.go (about) 1 package coreinstruction 2 3 import "gitlab.com/evatix-go/core/coredata/corejson" 4 5 type NameListCollection struct { 6 NameLists []NameList 7 } 8 9 func (it *NameListCollection) IsNull() bool { 10 return it == nil 11 } 12 13 func (it *NameListCollection) IsAnyNull() bool { 14 return it == nil || it.NameLists == nil 15 } 16 17 func (it *NameListCollection) IsEmpty() bool { 18 return it == nil || len(it.NameLists) == 0 19 } 20 21 func (it *NameListCollection) HasAnyItem() bool { 22 return !it.IsEmpty() 23 } 24 25 func (it *NameListCollection) Length() int { 26 if it == nil { 27 return 0 28 } 29 30 return len(it.NameLists) 31 } 32 33 func (it NameListCollection) String() string { 34 if it.IsNull() { 35 return "" 36 } 37 38 return corejson. 39 Serialize. 40 ToString(it) 41 }