rbt

package
v1.9.9 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RBTree added in v1.1.12

type RBTree interface {
	// Add overwrite if id repeated
	Add(val Value) bool
	Delete(Value) bool
	DeleteByID(Value) bool
	Exists(Value) bool
	ExistsByID(Value) bool
	Search(val Value) []Value
	SearchByID(Value) Value
	// Range do not by id
	Range(min, max Value) []Value
	Size() uint32
	Empty() bool
	Maximum() []Value
	Minimum() []Value
	PopMaximum() []Value
	PopMinimum() []Value
	Asc() []Value
	Desc() []Value
	String() string
	ToJSON() []byte
}

func JSON2Tree added in v1.1.12

func JSON2Tree(raw []byte, json2Value func([]byte) (Value, error)) (RBTree, error)

func New added in v1.1.12

func New() RBTree

type Value

type Value interface {
	ID() string
	String() string
	Compare(Value) stringutil.Diff
	ToJSON() []byte
}

Jump to

Keyboard shortcuts

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