setmatrix

package
v23.0.10 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SetMatrix

type SetMatrix interface {
	// Get returns the members of the set for a specific key as a slice.
	Get(key string) ([]interface{}, bool)
	// Contains is used to verify if an element is in a set for a specific key
	// returns true if the element is in the set
	// returns true if there is a set for the key
	Contains(key string, value interface{}) (bool, bool)
	// Insert inserts the value in the set of a key
	// returns true if the value is inserted (was not already in the set), false otherwise
	// returns also the length of the set for the key
	Insert(key string, value interface{}) (bool, int)
	// Remove removes the value in the set for a specific key
	// returns true if the value is deleted, false otherwise
	// returns also the length of the set for the key
	Remove(key string, value interface{}) (bool, int)
	// Cardinality returns the number of elements in the set for a key
	// returns false if the set is not present
	Cardinality(key string) (int, bool)
	// String returns the string version of the set, empty otherwise
	// returns false if the set is not present
	String(key string) (string, bool)
	// Returns all the keys in the map
	Keys() []string
}

SetMatrix is a map of Sets

func NewSetMatrix

func NewSetMatrix() SetMatrix

NewSetMatrix creates a new set matrix object

Jump to

Keyboard shortcuts

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