linkedhashmap

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LinkedHashmap

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

LinkedHashmap

func New

func New() *LinkedHashmap

New

func (*LinkedHashmap) Clear

func (lhmap *LinkedHashmap) Clear()

Clear

func (*LinkedHashmap) Empty

func (lhmap *LinkedHashmap) Empty() bool

Empty returns true if map does not contain any elements

func (*LinkedHashmap) Get

func (lhmap *LinkedHashmap) Get(key interface{}) (interface{}, bool)

Get

func (*LinkedHashmap) Insert

func (lhmap *LinkedHashmap) Insert(idx uint, key interface{}, value interface{}) bool

Insert 如果成功在该位置返回True, 否则返回false 类似 linkedlist Size 可以 等于 idx

func (*LinkedHashmap) Keys

func (lhmap *LinkedHashmap) Keys() []interface{}

Keys returns all keys left to right (head to tail)

func (*LinkedHashmap) PushBack

func (lhmap *LinkedHashmap) PushBack(key interface{}, value interface{})

PushBack equal to Put, if key exists, push value replace the value is exists. size is unchanging

func (*LinkedHashmap) PushFront

func (lhmap *LinkedHashmap) PushFront(key interface{}, value interface{})

PushFront if key exists, push value replace the value is exists. size is unchanging

func (*LinkedHashmap) Put

func (lhmap *LinkedHashmap) Put(key interface{}, value interface{})

Put equal to PushBack

func (*LinkedHashmap) Remove

func (lhmap *LinkedHashmap) Remove(key interface{}) (interface{}, bool)

Remove if key not exists reture nil, false.

func (*LinkedHashmap) RemoveIndex

func (lhmap *LinkedHashmap) RemoveIndex(idx uint) (interface{}, bool)

RemoveIndex

func (*LinkedHashmap) Size

func (lhmap *LinkedHashmap) Size() uint

Size returns number of elements in the map.

func (*LinkedHashmap) String

func (lhmap *LinkedHashmap) String() string

String returns a string

func (*LinkedHashmap) Values

func (lhmap *LinkedHashmap) Values() []interface{}

Values returns all values in-order based on the key.

Jump to

Keyboard shortcuts

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