Documentation ¶
Index ¶
- type HashMap
- func (hm *HashMap[K, V]) Clear()
- func (hm *HashMap[K, V]) Compute(key K, f function.BiFunction[K, V, V]) (V, error)
- func (hm *HashMap[K, V]) ContainsKey(key K) bool
- func (hm *HashMap[K, V]) ContainsValue(value V) bool
- func (hm *HashMap[K, V]) Get(key K) (V, error)
- func (hm *HashMap[K, V]) GetOrDefault(key K, defaultValue V) V
- func (hm *HashMap[K, V]) IsEmpty() bool
- func (hm *HashMap[K, V]) Iterator() iterator.Iterator[*Pair[K, V]]
- func (hm *HashMap[K, V]) Keys() (list.List[K], error)
- func (hm *HashMap[K, V]) Put(key K, value V) V
- func (hm *HashMap[K, V]) PutAll(values ...*Pair[K, V])
- func (hm *HashMap[K, V]) Remove(key K) (V, error)
- func (hm *HashMap[K, V]) RemoveWithVal(key K, value V) (V, error)
- func (hm *HashMap[K, V]) Replace(key K, newValue V) error
- func (hm *HashMap[K, V]) ReplaceAll(f function.BiFunction[K, V, V]) error
- func (hm *HashMap[K, V]) ReplaceWithVal(key K, oldValue V, newValue V) error
- func (hm *HashMap[K, V]) Size() int64
- func (hm *HashMap[K, V]) Values() (list.List[V], error)
- type Map
- type Pair
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HashMap ¶
type HashMap[K comparable, V comparable] struct { // contains filtered or unexported fields }
func (*HashMap[K, V]) Compute ¶
func (hm *HashMap[K, V]) Compute(key K, f function.BiFunction[K, V, V]) (V, error)
func (*HashMap[K, V]) ContainsKey ¶
func (*HashMap[K, V]) ContainsValue ¶
func (*HashMap[K, V]) GetOrDefault ¶
func (hm *HashMap[K, V]) GetOrDefault(key K, defaultValue V) V
func (*HashMap[K, V]) RemoveWithVal ¶
func (*HashMap[K, V]) ReplaceAll ¶
func (hm *HashMap[K, V]) ReplaceAll(f function.BiFunction[K, V, V]) error
func (*HashMap[K, V]) ReplaceWithVal ¶
type Map ¶
type Map[K comparable, V comparable] interface { Put(key K, value V) V PutAll(values ...*Pair[K, V]) Get(key K) (V, error) GetOrDefault(key K, defaultValue V) V Remove(key K) (V, error) RemoveWithVal(key K, value V) (V, error) Replace(key K, newValue V) error ReplaceWithVal(key K, oldValue V, newValue V) error ReplaceAll(f function.BiFunction[K, V, V]) error Compute(key K, f function.BiFunction[K, V, V]) (V, error) ContainsKey(key K) bool ContainsValue(value V) bool Size() int64 Keys() (list.List[K], error) Values() (list.List[V], error) Clear() IsEmpty() bool Iterator() iterator.Iterator[*Pair[K, V]] }
func NewHashMap ¶
func NewHashMap[K comparable, V comparable](values ...*Pair[K, V]) Map[K, V]
type Pair ¶
type Pair[F comparable, S comparable] struct { // contains filtered or unexported fields }
func NewPair ¶
func NewPair[F comparable, S comparable](first F, second S) *Pair[F, S]
Click to show internal directories.
Click to hide internal directories.