patterns

package
v1.29.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder added in v1.26.5

type Builder[T any] interface {
	Build() T
}

Builder pattern

type Cloneable added in v1.29.0

type Cloneable[T any] interface {
	// Clone creates a new instance of the object
	Clone() T
}

Cloneable pattern

type Comparable added in v1.28.4

type Comparable[T any] interface {
	// Compare l<r:<0, l=r: 0, l>r:>0
	Compare(rhs T) int
}

Comparable pattern

type Iteratable

type Iteratable[T any] interface {
	Iterator() iter.Seq[T]
}

Iteratable object

type Iteratable2 added in v1.29.0

type Iteratable2[T, U any] interface {
	Iterator() iter.Seq2[T, U]
}

Iteratable2 object (2 values)

type IteratableIdx added in v1.29.0

type IteratableIdx[T any] interface {
	Iterator() iter.Seq2[int, T]
}

IteratableIdx object (with index)

type NamedObject

type NamedObject interface {
	Name() string
}

NamedObject has a name

type NamedObjectImpl

type NamedObjectImpl string

func (NamedObjectImpl) Name

func (n NamedObjectImpl) Name() string

Jump to

Keyboard shortcuts

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