behavioral

package
v0.0.0-...-7e26a5e Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 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 AK

type AK struct{}

func (*AK) UseWeapon

func (ak *AK) UseWeapon()

type Beverage

type Beverage interface {
	BoilWater()
	Brew()
	PourInCup()
	AddThings()
	WantAddThings() bool
}

type Command

type Command interface {
	Treat()
}

type CommandEye

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

func (*CommandEye) Treat

func (cmd *CommandEye) Treat()

type CommandNose

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

func (*CommandNose) Treat

func (cmd *CommandNose) Treat()

type Doctor

type Doctor struct{}

type Hero

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

func (*Hero) Fight

func (h *Hero) Fight()

func (*Hero) SetWeaponStrategy

func (h *Hero) SetWeaponStrategy(s WeaponStrategy)

type Kinfe

type Kinfe struct{}

func (*Kinfe) UseWeapon

func (kinfe *Kinfe) UseWeapon()

type Listener

type Listener interface {
	OnTeacherComming()
}

type MakeCoffee

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

func NewMakeCoffee

func NewMakeCoffee() *MakeCoffee

func (*MakeCoffee) AddThings

func (mc *MakeCoffee) AddThings()

func (*MakeCoffee) BoilWater

func (mc *MakeCoffee) BoilWater()

func (*MakeCoffee) Brew

func (mc *MakeCoffee) Brew()

func (*MakeCoffee) MakeBerverage

func (t *MakeCoffee) MakeBerverage()

func (*MakeCoffee) PourInCup

func (mc *MakeCoffee) PourInCup()

func (*MakeCoffee) WantAddThings

func (mc *MakeCoffee) WantAddThings() bool

type Monitor

type Monitor struct {
	ListenerList []Listener
}

func (*Monitor) AddListener

func (monitor *Monitor) AddListener(listener Listener)

func (*Monitor) Notify

func (monitor *Monitor) Notify()

func (*Monitor) RemoveListener

func (monitor *Monitor) RemoveListener(listener Listener)

type Notifier

type Notifier interface {
	AddListener(listener Listener)
	RemoveListener(listener Listener)
	Notify()
}

type StuOne

type StuOne struct {
	Badthing string
}

func (*StuOne) DoBadthing

func (s *StuOne) DoBadthing()

func (*StuOne) OnTeacherComming

func (s *StuOne) OnTeacherComming()

type StuTwo

type StuTwo struct {
	Badthing string
}

func (*StuTwo) DoBadthing

func (s *StuTwo) DoBadthing()

func (*StuTwo) OnTeacherComming

func (s *StuTwo) OnTeacherComming()

type WeaponStrategy

type WeaponStrategy interface {
	UseWeapon()
}

Jump to

Keyboard shortcuts

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