mapx

package
v0.0.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

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 key value mapping

func NewMap

func NewMap(cap int) *Map

NewMap new map

func (*Map) ContainsKey

func (m *Map) ContainsKey(key any) bool

ContainsKey check the key exist or not

func (*Map) Empty

func (m *Map) Empty() bool

Empty the map empty or not

func (*Map) Get

func (m *Map) Get(key any) any

Get value by key, may be nil

func (*Map) Put

func (m *Map) Put(key any, value any) bool

Put key value to map

func (*Map) Remove

func (m *Map) Remove(key any) bool

Remove by key

func (*Map) Size

func (m *Map) Size() int

Size map size

func (*Map) Value

func (m *Map) Value(key any) any

Value by key

type MultiValueMap

type MultiValueMap struct {
	// contains filtered or unexported fields
}

MultiValueMap one key mapping multi values

func NewMultiValueMap

func NewMultiValueMap(cap int) *MultiValueMap

NewMultiValueMap multi values map

func (*MultiValueMap) ContainsKey

func (m *MultiValueMap) ContainsKey(key any) bool

ContainsKey check the key exist or not

func (*MultiValueMap) Empty

func (m *MultiValueMap) Empty() bool

Empty the map empty or not

func (*MultiValueMap) Get

func (m *MultiValueMap) Get(key any) *listx.Arraylist

Get values by key

func (*MultiValueMap) Put

func (m *MultiValueMap) Put(key any, value ...any) bool

Put value to mutil value map

func (*MultiValueMap) Remove

func (m *MultiValueMap) Remove(key any) bool

Remove key from mutil value map

func (*MultiValueMap) Size

func (m *MultiValueMap) Size() int

Size mutil value map size

func (*MultiValueMap) Values

func (m *MultiValueMap) Values(key any) *listx.Arraylist

Values by key

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL