lists

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterCodec

func RegisterCodec(codec *codec.Codec)

Types

type DataList

type DataList interface {
	Size() int
	GetList() []data.Data
	Search(data data.Data) (int, bool)

	Add(...data.Data) DataList
	Remove(...data.Data) DataList
}

type IDList

type IDList interface {
	Size() int
	GetList() []ids.ID
	Search(ids.ID) (index int, found bool)
	Add(...ids.ID) IDList
	Remove(...ids.ID) IDList
}

type List

type List interface {
	// TODO add search and apply methods
	Get() []traits.Listable
	// Size
	// * returns the number of elements in the list
	Size() int

	// Search
	// * returns true and index of element if element is found
	// * return false and index of insertion if element is not found
	Search(traits.Listable) (index int, found bool) // TODO prevent compare panic
	Add(...traits.Listable) List                    // TODO prevent compare panic
	Remove(...traits.Listable) List                 // TODO prevent compare panic
	Mutate(...traits.Listable) List                 // TODO prevent compare panic
}

List * all elements are sorted * all methods are search and insertion complexity optimized

type MetaPropertyList

type MetaPropertyList interface {
	GetList() []properties.MetaProperty
	GetMetaProperty(ids.PropertyID) properties.MetaProperty
	ToPropertyList() PropertyList

	Add(...properties.MetaProperty) MetaPropertyList
}

type PropertyList

type PropertyList interface {
	GetProperty(ids.PropertyID) properties.Property
	GetList() []properties.Property

	Add(...properties.Property) PropertyList
	Remove(...properties.Property) PropertyList
	Mutate(...properties.Property) PropertyList
}

type SignatureList

type SignatureList interface {
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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