example

package
v0.0.0-...-8d22ec3 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Abstraction

type Abstraction interface {
	Execute(str string)
}

抽象接口

type ConcreteImplementor

type ConcreteImplementor struct{}

具体实现

func NewConcreteImplementor

func NewConcreteImplementor() *ConcreteImplementor

初始化具体实现对象

func (*ConcreteImplementor) Implementation

func (*ConcreteImplementor) Implementation(str string)

type Implementor

type Implementor interface {
	Implementation(str string)
}

实现接口

type RefinedAbstraction

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

扩充抽象

func NewRefinedAbstraction

func NewRefinedAbstraction(im Implementor) *RefinedAbstraction

初始化扩充抽象对象

func (*RefinedAbstraction) Execute

func (c *RefinedAbstraction) Execute(str string)

扩充抽象方法

Jump to

Keyboard shortcuts

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