Documentation ¶
Index ¶
- type Map
- func (m *Map) ComputeIfAbsent(key interface{}, compFunction func(key interface{}) interface{}) (value interface{}, computed bool)
- func (m *Map) Contains(key interface{}) bool
- func (m *Map) Get(key interface{}) (value interface{}, found bool)
- func (m *Map) Put(key interface{}, value interface{}) interface{}
- func (m *Map) Remove(key interface{}) (found bool)
- func (m *Map) Size() (size int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Map ¶
type Map struct {
// contains filtered or unexported fields
}
Map is a thread-safe map
func (*Map) ComputeIfAbsent ¶
func (m *Map) ComputeIfAbsent(key interface{}, compFunction func(key interface{}) interface{}) (value interface{}, computed bool)
ComputeIfAbsent check if the specified key is not already associated with a value, attempts to compute its value using the given mapping function and enters it into this map.
func (*Map) Put ¶
func (m *Map) Put(key interface{}, value interface{}) interface{}
Put associates the specified value with the specified key.
Click to show internal directories.
Click to hide internal directories.