Documentation
¶
Index ¶
- type LinkedHashSet
- func (l *LinkedHashSet[T]) Add(elements ...T)
- func (l *LinkedHashSet[T]) AsInterface() []interface{}
- func (l *LinkedHashSet[T]) AsSlice() []T
- func (l *LinkedHashSet[T]) InArray(search T) bool
- func (l *LinkedHashSet[T]) Iter() <-chan T
- func (l *LinkedHashSet[T]) Length() int
- func (l *LinkedHashSet[T]) Remove(elements ...T)
- type LinkedHashSetINT
- func (l *LinkedHashSetINT) Add(elements ...int)
- func (l *LinkedHashSetINT) AsInterface() []interface{}
- func (l *LinkedHashSetINT) AsSlice() []int
- func (l *LinkedHashSetINT) InArray(search int) bool
- func (l *LinkedHashSetINT) Iter() <-chan int
- func (l *LinkedHashSetINT) Length() int
- func (l *LinkedHashSetINT) Remove(elements ...int)
- type LinkedHashSetINT64
- func (l *LinkedHashSetINT64) Add(elements ...int64)
- func (l *LinkedHashSetINT64) AsInterface() []interface{}
- func (l *LinkedHashSetINT64) AsSlice() []int64
- func (l *LinkedHashSetINT64) InArray(search int64) bool
- func (l *LinkedHashSetINT64) Iter() <-chan int64
- func (l *LinkedHashSetINT64) Length() int
- func (l *LinkedHashSetINT64) Remove(elements ...int64)
- type LinkedHashSetString
- func (l *LinkedHashSetString) Add(elements ...string)
- func (l *LinkedHashSetString) AsInterface() []interface{}
- func (l *LinkedHashSetString) AsSlice() []string
- func (l *LinkedHashSetString) InArray(search string) bool
- func (l *LinkedHashSetString) Iter() <-chan string
- func (l *LinkedHashSetString) Length() int
- func (l *LinkedHashSetString) Remove(elements ...string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LinkedHashSet ¶
type LinkedHashSet[T comparable] struct { // contains filtered or unexported fields }
LinkedHashSet linked hash set implementation using linkedHashMap as its underlying data structure.
- Does not allow storing duplicated values - Does not allow storing nil values - Maintains insertion order over iteration
func NewLinkedHashSet ¶
func NewLinkedHashSet[T comparable](items ...T) *LinkedHashSet[T]
NewLinkedHashSet returns a new LinkedHashSet with the provided items
func (*LinkedHashSet[T]) Add ¶
func (l *LinkedHashSet[T]) Add(elements ...T)
Add adds elements to the linked hash set
func (*LinkedHashSet[T]) AsInterface ¶
func (l *LinkedHashSet[T]) AsInterface() []interface{}
AsInterface returns a slice of all values of the linked hash set as interface{}
func (*LinkedHashSet[T]) AsSlice ¶
func (l *LinkedHashSet[T]) AsSlice() []T
AsSlice returns a slice of all values of the linked hash set
func (*LinkedHashSet[T]) InArray ¶
func (l *LinkedHashSet[T]) InArray(search T) bool
InArray returns whether the given item is in array or not
func (*LinkedHashSet[T]) Iter ¶
func (l *LinkedHashSet[T]) Iter() <-chan T
Iter iterates over each element of the linked hash set
func (*LinkedHashSet[T]) Length ¶
func (l *LinkedHashSet[T]) Length() int
Length returns the length of the linked hash set
func (*LinkedHashSet[T]) Remove ¶
func (l *LinkedHashSet[T]) Remove(elements ...T)
Remove removes elements from the linked hash set
type LinkedHashSetINT ¶
type LinkedHashSetINT struct {
// contains filtered or unexported fields
}
LinkedHashSetINT linked hash set implementation using linkedHashMap as its underlying data structure.
- Does not allow storing duplicated values - Does not allow storing nil values - Maintains insertion order over iteration
func NewLinkedHashSetINT ¶
func NewLinkedHashSetINT(ints ...int) *LinkedHashSetINT
NewLinkedHashSetINT returns a new LinkedHashSetINT with the provided items
func (*LinkedHashSetINT) Add ¶
func (l *LinkedHashSetINT) Add(elements ...int)
Add adds elements to the linked hash set
func (*LinkedHashSetINT) AsInterface ¶
func (l *LinkedHashSetINT) AsInterface() []interface{}
AsInterface returns a slice of all values of the linked hash set as interface{}
func (*LinkedHashSetINT) AsSlice ¶
func (l *LinkedHashSetINT) AsSlice() []int
AsSlice returns a slice of all values of the linked hash set
func (*LinkedHashSetINT) InArray ¶
func (l *LinkedHashSetINT) InArray(search int) bool
InArray returns whether the given item is in array or not
func (*LinkedHashSetINT) Iter ¶
func (l *LinkedHashSetINT) Iter() <-chan int
Iter iterates over each element of the linked hash set
func (*LinkedHashSetINT) Length ¶
func (l *LinkedHashSetINT) Length() int
Length returns the length of the linked hash set
func (*LinkedHashSetINT) Remove ¶
func (l *LinkedHashSetINT) Remove(elements ...int)
Remove removes elements from the linked hash set
type LinkedHashSetINT64 ¶
type LinkedHashSetINT64 struct {
// contains filtered or unexported fields
}
LinkedHashSetINT64 linked hash set implementation using linkedHashMap as its underlying data structure.
- Does not allow storing duplicated values - Does not allow storing nil values - Maintains insertion order over iteration
func NewLinkedHashSetINT64 ¶
func NewLinkedHashSetINT64(ints ...int64) *LinkedHashSetINT64
NewLinkedHashSetINT64 returns a new LinkedHashSetINT64 with the provided items
func (*LinkedHashSetINT64) Add ¶
func (l *LinkedHashSetINT64) Add(elements ...int64)
Add adds elements to the linked hash set
func (*LinkedHashSetINT64) AsInterface ¶
func (l *LinkedHashSetINT64) AsInterface() []interface{}
AsInterface returns a slice of all values of the linked hash set as interface{}
func (*LinkedHashSetINT64) AsSlice ¶
func (l *LinkedHashSetINT64) AsSlice() []int64
AsSlice returns a slice of all values of the linked hash set
func (*LinkedHashSetINT64) InArray ¶
func (l *LinkedHashSetINT64) InArray(search int64) bool
InArray returns whether the given item is in array or not
func (*LinkedHashSetINT64) Iter ¶
func (l *LinkedHashSetINT64) Iter() <-chan int64
Iter iterates over each element of the linked hash set
func (*LinkedHashSetINT64) Length ¶
func (l *LinkedHashSetINT64) Length() int
Length returns the length of the linked hash set
func (*LinkedHashSetINT64) Remove ¶
func (l *LinkedHashSetINT64) Remove(elements ...int64)
Remove removes elements from the linked hash set
type LinkedHashSetString ¶
type LinkedHashSetString struct {
// contains filtered or unexported fields
}
LinkedHashSetString linked hash set implementation using linkedHashMap as its underlying data structure.
- Does not allow storing duplicated values - Does not allow storing nil values - Maintains insertion order over iteration
func NewLinkedHashSetString ¶
func NewLinkedHashSetString(strings ...string) *LinkedHashSetString
NewLinkedHashSetString returns a new LinkedHashSetString with the provided items
func (*LinkedHashSetString) Add ¶
func (l *LinkedHashSetString) Add(elements ...string)
Add adds elements to the linked hash set
func (*LinkedHashSetString) AsInterface ¶
func (l *LinkedHashSetString) AsInterface() []interface{}
AsInterface returns a slice of all values of the linked hash set as interface{}
func (*LinkedHashSetString) AsSlice ¶
func (l *LinkedHashSetString) AsSlice() []string
AsSlice returns a slice of all values of the linked hash set
func (*LinkedHashSetString) InArray ¶
func (l *LinkedHashSetString) InArray(search string) bool
InArray returns whether the given item is in array or not
func (*LinkedHashSetString) Iter ¶
func (l *LinkedHashSetString) Iter() <-chan string
Iter iterates over each element of the linked hash set
func (*LinkedHashSetString) Length ¶
func (l *LinkedHashSetString) Length() int
Length returns the length of the linked hash set
func (*LinkedHashSetString) Remove ¶
func (l *LinkedHashSetString) Remove(elements ...string)
Remove removes elements from the linked hash set