alg

package
v0.0.0-...-9649b88 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2020 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrElemExist = errors.New("elem exist")
View Source
var ErrElemNtExist = errors.New("elem not exist")

Functions

This section is empty.

Types

type Comparable

type Comparable interface {
	IsEqual(obj interface{}) bool
}

type IDAllocator

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

func NewIDAllocator

func NewIDAllocator() *IDAllocator

func (*IDAllocator) Alloc

func (this *IDAllocator) Alloc() int

func (*IDAllocator) Free

func (this *IDAllocator) Free(id int)

func (*IDAllocator) InitByHistory

func (this *IDAllocator) InitByHistory(historySlice []int)

type Slice

type Slice []interface{}

func NewSlice

func NewSlice() Slice

func (*Slice) Add

func (this *Slice) Add(elem interface{}) error

func (*Slice) Remove

func (this *Slice) Remove(elem interface{}) error

type StringSlice

type StringSlice []string

func NewStringSlice

func NewStringSlice() StringSlice

func (*StringSlice) Add

func (this *StringSlice) Add(elem string) error

func (*StringSlice) Remove

func (this *StringSlice) Remove(elem string) error

Jump to

Keyboard shortcuts

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