Documentation ¶
Index ¶
- type LinkedHashmap
- func (lhmap *LinkedHashmap) Clear()
- func (lhmap *LinkedHashmap) Empty() bool
- func (lhmap *LinkedHashmap) Get(key interface{}) (interface{}, bool)
- func (lhmap *LinkedHashmap) Insert(idx uint, key interface{}, value interface{}) bool
- func (lhmap *LinkedHashmap) Keys() []interface{}
- func (lhmap *LinkedHashmap) PushBack(key interface{}, value interface{})
- func (lhmap *LinkedHashmap) PushFront(key interface{}, value interface{})
- func (lhmap *LinkedHashmap) Put(key interface{}, value interface{})
- func (lhmap *LinkedHashmap) Remove(key interface{}) (interface{}, bool)
- func (lhmap *LinkedHashmap) RemoveIndex(idx uint) (interface{}, bool)
- func (lhmap *LinkedHashmap) Size() uint
- func (lhmap *LinkedHashmap) String() string
- func (lhmap *LinkedHashmap) Values() []interface{}
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 (*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) Values ¶
func (lhmap *LinkedHashmap) Values() []interface{}
Values returns all values in-order based on the key.
Click to show internal directories.
Click to hide internal directories.