sets

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2022 License: Apache-2.0 Imports: 6 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) Any added in v0.9.0

func (s Set) Any() string

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) Hash added in v0.8.0

func (s Set) Hash() (uint64, error)

Hash provides a hash function so we can generate a good hash for Set which has no public fields.

func (Set) Insert added in v0.9.0

func (s Set) Insert(items ...string)

func (Set) Intersection

func (s Set) Intersection(set Set) Set

Intersection returns a new set containing the common values

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) Type added in v0.7.3

func (s Set) Type() v1.NodeSelectorOperator

func (Set) Values

func (s Set) Values() sets.String

Values returns the values of the set. If the set is negatively defined, it will panic

Jump to

Keyboard shortcuts

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