_3_abstract_factory

package
v0.0.0-...-a7c7adb Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2023 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 AbstractFactory

type AbstractFactory interface {
	CreateTelevision() ITelevision
	CreateAirConditioner() IAirConditioner
}

type HuaWeiAirConditioner

type HuaWeiAirConditioner struct{}

func (*HuaWeiAirConditioner) SetTemperature

func (ha *HuaWeiAirConditioner) SetTemperature(temp int)

type HuaWeiFactory

type HuaWeiFactory struct{}

func (*HuaWeiFactory) CreateAirConditioner

func (hf *HuaWeiFactory) CreateAirConditioner() IAirConditioner

func (*HuaWeiFactory) CreateTelevision

func (hf *HuaWeiFactory) CreateTelevision() ITelevision

type HuaWeiTV

type HuaWeiTV struct{}

func (*HuaWeiTV) Watch

func (ht *HuaWeiTV) Watch()

type IAirConditioner

type IAirConditioner interface {
	SetTemperature(int)
}

type ITelevision

type ITelevision interface {
	Watch()
}

type MiAirConditioner

type MiAirConditioner struct{}

func (*MiAirConditioner) SetTemperature

func (ma *MiAirConditioner) SetTemperature(temp int)

type MiFactory

type MiFactory struct{}

func (*MiFactory) CreateAirConditioner

func (mf *MiFactory) CreateAirConditioner() IAirConditioner

func (*MiFactory) CreateTelevision

func (mf *MiFactory) CreateTelevision() ITelevision

type MiTV

type MiTV struct{}

func (*MiTV) Watch

func (mt *MiTV) Watch()

Jump to

Keyboard shortcuts

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