set

package
v0.4.29 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2022 License: ISC Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSet

func NewSet[T comparable](elements []parl.Element[T]) (interfaceSet parl.Set[T])

NewSet returns an enumeration of a printable semantic function argument. elements are the elements that form this set.

func PrintAsString

func PrintAsString(value any) (s string)

Types

type Element

type Element[T comparable] struct {
	ValueV T
	Name   string
}

func (*Element[T]) String

func (pv *Element[T]) String() (s string)

func (*Element[T]) Value

func (pv *Element[T]) Value() (value T)

type SetImpl

type SetImpl[T comparable] struct {
	// contains filtered or unexported fields
}

SetImpl holds a multiple-selection function argument that has printable representation. PrintableEnum allows finite selection function arguments to have meaningful names and makes those names printable.

func (*SetImpl[T]) Element

func (st *SetImpl[T]) Element(value T) (element parl.Element[T])

func (*SetImpl[T]) IsValid

func (st *SetImpl[T]) IsValid(value T) (isValid bool)

func (*SetImpl[T]) String

func (st *SetImpl[T]) String() (s string)

func (*SetImpl[T]) StringT

func (st *SetImpl[T]) StringT(value T) (s string)

StringT provides a String function to a named type implementing a set

Jump to

Keyboard shortcuts

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