collections

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2019 License: Apache-2.0 Imports: 5 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DoubleList

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

func NewDoubleList

func NewDoubleList() *DoubleList

func (*DoubleList) Clear

func (dl *DoubleList) Clear()

func (*DoubleList) Delete

func (dl *DoubleList) Delete(val interface{})

func (*DoubleList) DeleteByCount

func (dl *DoubleList) DeleteByCount(val interface{}, count int)

func (*DoubleList) DeleteByIndex

func (dl *DoubleList) DeleteByIndex(val interface{}, index int)

func (*DoubleList) GetValueList

func (dl *DoubleList) GetValueList(val interface{}) []interface{}

func (*DoubleList) LGet

func (dl *DoubleList) LGet() (interface{}, bool)

func (*DoubleList) LPop

func (dl *DoubleList) LPop() (interface{}, bool)

func (*DoubleList) LPut

func (dl *DoubleList) LPut(val interface{})

func (*DoubleList) LToArray

func (dl *DoubleList) LToArray() []interface{}

func (*DoubleList) Len

func (dl *DoubleList) Len() int

func (*DoubleList) RGet

func (dl *DoubleList) RGet() (interface{}, bool)

func (*DoubleList) RPop

func (dl *DoubleList) RPop() (interface{}, bool)

func (*DoubleList) RPut

func (dl *DoubleList) RPut(val interface{})

func (*DoubleList) RToArray

func (dl *DoubleList) RToArray() []interface{}

type Map

type Map struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

BeeMap is a map with lock

func NewMap

func NewMap() *Map

NewBeeMap return new safemap

func (*Map) Add

func (m *Map) Add(k interface{}, v interface{})

func (*Map) Get

func (m *Map) Get(k interface{}) interface{}

Get from maps return the k's value

func (*Map) Has

func (m *Map) Has(k interface{}) bool

Has Returns true if k is exist in the map.

func (*Map) IsEmpty

func (m *Map) IsEmpty() bool

func (*Map) Items

func (m *Map) Items() map[interface{}]interface{}

Items returns all items in safemap.

func (*Map) Len

func (m *Map) Len() int

Count returns the number of items within the map.

func (*Map) Remove

func (m *Map) Remove(k interface{})

Delete the given key and value.

func (*Map) Set

func (m *Map) Set(k interface{}, v interface{}) bool

Set Maps the given key and value. Returns false if the key is already in the map and changes nothing.

type SafeList

type SafeList struct {
	C chan bool
	// contains filtered or unexported fields
}

SafeList 安全链表

func NewSafeList

func NewSafeList() *SafeList

NewSafeList 新创建一个列表

func (*SafeList) IsEmpty

func (sl *SafeList) IsEmpty() bool

IsEmpty 是否为空

func (*SafeList) Pop

func (sl *SafeList) Pop() (interface{}, error)

Pop 拿出

func (*SafeList) Put

func (sl *SafeList) Put(data interface{})

Put 放入

type SafeListNode

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

SafeListNode 节点

type Set

type Set struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewSet

func NewSet() *Set

func (*Set) Add

func (s *Set) Add(item interface{})

func (*Set) Clear

func (s *Set) Clear()

func (*Set) Has

func (s *Set) Has(item interface{}) bool

func (*Set) IsEmpty

func (s *Set) IsEmpty() bool

func (*Set) Len

func (s *Set) Len() interface{}

func (*Set) Remove

func (s *Set) Remove(item interface{})

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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