_6_builder

package
v0.0.0-...-eb36113 Latest Latest
Warning

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

Go to latest
Published: May 19, 2023 License: Apache-2.0, MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder interface {
	Part1()
	Part2()
	Part3()
}

TODO: 泛型优化

type Builder1

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

func (*Builder1) GetResult

func (b *Builder1) GetResult() string

func (*Builder1) Part1

func (b *Builder1) Part1()

func (*Builder1) Part2

func (b *Builder1) Part2()

func (*Builder1) Part3

func (b *Builder1) Part3()

type Builder2

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

func (*Builder2) GetResult

func (b *Builder2) GetResult() int

func (*Builder2) Part1

func (b *Builder2) Part1()

func (*Builder2) Part2

func (b *Builder2) Part2()

func (*Builder2) Part3

func (b *Builder2) Part3()

type Director

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

func NewDirector

func NewDirector(b Builder) *Director

func (*Director) Construct

func (d *Director) Construct()

Construct Product

Jump to

Keyboard shortcuts

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