astimap

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2018 License: MIT Imports: 0 Imported by: 6

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 represents a bi-directional map

func NewMap

func NewMap(defaultA, defaultB interface{}) *Map

NewMap builds a new *Map

func (*Map) A

func (m *Map) A(b interface{}) interface{}

A retrieves a based on b

func (*Map) B

func (m *Map) B(a interface{}) interface{}

B retrieves b based on a

func (*Map) InA

func (m *Map) InA(a interface{}) (ok bool)

InA checks whether a exists

func (*Map) InB

func (m *Map) InB(b interface{}) (ok bool)

InB checks whether b exists

func (*Map) Set

func (m *Map) Set(a, b interface{}) *Map

Set sets a key/value couple

Jump to

Keyboard shortcuts

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