Documentation
¶
Index ¶
- func IsNull(a any) bool
- func NewEnum[E enumElem_, ES enum_[E]](e ES) ES
- func NotNull(a any) bool
- type Entry
- type EnumElem__
- type Enum__
- func (this *Enum__[E]) Elems() []E
- func (this *Enum__[E]) Ids() []string
- func (this *Enum__[E]) Is(source E, targets ...E) bool
- func (this *Enum__[E]) Not(source E, targets ...E) bool
- func (this *Enum__[E]) OfId(id string) (e E)
- func (this *Enum__[E]) OfIdIgnoreCase(id string) (e E)
- func (this *Enum__[E]) Undefined() E
- type Map
- func (this *Map[K, V]) ContainsAnyKeys(ks ...K) bool
- func (this *Map[K, V]) ContainsKeys(ks ...K) bool
- func (this *Map[K, V]) Empty() bool
- func (this *Map[K, V]) Get(k K) (v V)
- func (this *Map[K, V]) GetEntry(k K) *Entry[K, V]
- func (this *Map[K, V]) GetIfAbsent(k K, f func(k K) V) (v V)
- func (this *Map[K, V]) Keys() []K
- func (this *Map[K, V]) Len() int64
- func (this *Map[K, V]) NotEmpty() bool
- func (this *Map[K, V]) Put(k K, v V)
- func (this *Map[K, V]) PutAll(other Map_[K, V])
- func (this *Map[K, V]) Range(f func(k K, v V))
- func (this *Map[K, V]) Raw() map[K]V
- func (this *Map[K, V]) Remove(k K) bool
- func (this *Map[K, V]) RemoveAll(ks ...K)
- func (this *Map[K, V]) Values() []V
- type Map_
- type Set
- func (this Set) Add(es ...T)
- func (this Set) AddSet(other Set_[T])
- func (this Set) Contains(ts ...T) bool
- func (this Set) ContainsAny(es ...T) bool
- func (this Set) Empty() bool
- func (this Set) Len() int64
- func (this Set) NotEmpty() bool
- func (this Set) Range(f func(e T))
- func (this Set) Raw() []T
- func (this Set) Remove(e T) bool
- func (this Set) RemoveAll(e ...T)
- type Set_
- type StrKeyMap
- type StrSet
- func (this StrSet) Add(es ...T)
- func (this StrSet) AddSet(other Set_[T])
- func (this StrSet) Contains(ts ...T) bool
- func (this StrSet) ContainsAny(es ...T) bool
- func (this StrSet) Empty() bool
- func (this StrSet) Len() int64
- func (this StrSet) NotEmpty() bool
- func (this StrSet) Range(f func(e T))
- func (this StrSet) Raw() []T
- func (this StrSet) Remove(e T) bool
- func (this StrSet) RemoveAll(e ...T)
- type SyncMap
- func (this *SyncMap[K, V]) ContainsAnyKeys(ks ...K) bool
- func (this *SyncMap[K, V]) ContainsKeys(ks ...K) bool
- func (this *SyncMap[K, V]) Empty() bool
- func (this *SyncMap[K, V]) Get(k K) (v V)
- func (this *SyncMap[K, V]) GetEntry(k K) *Entry[K, V]
- func (this *SyncMap[K, V]) GetIfAbsent(k K, f func(k K) V) (v V)
- func (this *SyncMap[K, V]) Keys() []K
- func (this *SyncMap[K, V]) Len() int64
- func (this *SyncMap[K, V]) NotEmpty() bool
- func (this *SyncMap[K, V]) Put(k K, v V)
- func (this *SyncMap[K, V]) PutAll(other Map_[K, V])
- func (this *SyncMap[K, V]) Range(f func(k K, v V))
- func (this *SyncMap[K, V]) Raw() map[K]V
- func (this *SyncMap[K, V]) Remove(k K) bool
- func (this *SyncMap[K, V]) RemoveAll(ks ...K)
- func (this *SyncMap[K, V]) Values() []V
- type SyncSet
- func (this SyncSet) Add(es ...T)
- func (this SyncSet) AddSet(other Set_[T])
- func (this SyncSet) Contains(ts ...T) bool
- func (this SyncSet) ContainsAny(es ...T) bool
- func (this SyncSet) Empty() bool
- func (this SyncSet) Len() int64
- func (this SyncSet) NotEmpty() bool
- func (this SyncSet) Range(f func(e T))
- func (this SyncSet) Raw() []T
- func (this SyncSet) Remove(e T) bool
- func (this SyncSet) RemoveAll(e ...T)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Entry ¶
type Entry[K comparable, V any] struct { Key K Value V }
type EnumElem__ ¶
type EnumElem__ struct {
// contains filtered or unexported fields
}
type Enum__ ¶
type Enum__[E enumElem_] struct {
// contains filtered or unexported fields
}
func (*Enum__[E]) OfIdIgnoreCase ¶
OfIdIgnoreCase 查找ID对应枚举值,不区分大小写
type Map ¶
type Map[K comparable, V any] struct { // contains filtered or unexported fields }
func NewMap ¶
func NewMap[K comparable, V any]() *Map[K, V]
func (*Map[K, V]) ContainsAnyKeys ¶
func (*Map[K, V]) ContainsKeys ¶
func (*Map[K, V]) GetIfAbsent ¶
func (this *Map[K, V]) GetIfAbsent(k K, f func(k K) V) (v V)
type Map_ ¶
type Map_[K comparable, V any] interface { Put(k K, v V) PutAll(other Map_[K, V]) GetEntry(k K) *Entry[K, V] Get(k K) (v V) GetIfAbsent(k K, f func(k K) V) (v V) Remove(k K) bool RemoveAll(ks ...K) ContainsKeys(ks ...K) bool ContainsAnyKeys(ks ...K) bool Keys() []K Values() []V Len() int64 Empty() bool NotEmpty() bool Raw() map[K]V Range(f func(k K, v V)) // contains filtered or unexported methods }
type Set ¶
type Set[T comparable] struct { // contains filtered or unexported fields }
func NewSet ¶
func NewSet[T comparable](es ...T) *Set[T]
func (Set) ContainsAny ¶
func (this Set) ContainsAny(es ...T) bool
type StrKeyMap ¶
func NewStrKeyMap ¶
type StrSet ¶
type StrSet struct {
// contains filtered or unexported fields
}
func (StrSet) ContainsAny ¶
func (this StrSet) ContainsAny(es ...T) bool
type SyncMap ¶
type SyncMap[K comparable, V any] struct { // contains filtered or unexported fields }
func NewSyncMap ¶
func NewSyncMap[K comparable, V any]() *SyncMap[K, V]
func (*SyncMap[K, V]) ContainsAnyKeys ¶
func (*SyncMap[K, V]) ContainsKeys ¶
func (*SyncMap[K, V]) GetIfAbsent ¶
func (this *SyncMap[K, V]) GetIfAbsent(k K, f func(k K) V) (v V)
type SyncSet ¶
type SyncSet[T comparable] struct { // contains filtered or unexported fields }
func NewSyncSet ¶
func NewSyncSet[T comparable](es ...T) *SyncSet[T]
func (SyncSet) ContainsAny ¶
func (this SyncSet) ContainsAny(es ...T) bool
Click to show internal directories.
Click to hide internal directories.