sets

package
v0.6.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Set

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

Set is a logical set of string values for the requirements. It supports representations using complement operator. e.g., if C={"A", "B"}, setting complement = true means C' contains every possible string values other than "A" and "B"

func NewComplementSet

func NewComplementSet(values ...string) Set

func NewSet

func NewSet(values ...string) Set

func (Set) DeepCopy

func (s Set) DeepCopy() Set

DeepCopy creates a deep copy of the set object It is required by the Kubernetes CRDs code generation

func (Set) Has

func (s Set) Has(value string) bool

Has returns true if and only if item is contained in the set.

func (Set) Intersection

func (s Set) Intersection(set Set) Set

Intersection returns a new set containing the common values

func (Set) IsComplement

func (s Set) IsComplement() bool

IsComplement returns whether the set is a complement set.

func (Set) Len

func (s Set) Len() int

Len returns the size of the set.

func (Set) String

func (s Set) String() string

func (Set) Values

func (s Set) Values() sets.String

Values returns the values of the set. If the set has an infinite size, it will panic

Jump to

Keyboard shortcuts

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