_4_factory_method

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 MinusOperator

type MinusOperator struct {
	*OperatorBase
}

func (*MinusOperator) Result

func (m *MinusOperator) Result() int

type MinusOperatorFactory

type MinusOperatorFactory struct{}

func (MinusOperatorFactory) Create

func (MinusOperatorFactory) Create() Operator

type Operator

type Operator interface {
	SetA(int)
	SetB(int)
	Result() int
}

type OperatorBase

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

func (*OperatorBase) SetA

func (o *OperatorBase) SetA(a int)

func (*OperatorBase) SetB

func (o *OperatorBase) SetB(b int)

type OperatorFactory

type OperatorFactory interface {
	Create() Operator
}

type PlusOperator

type PlusOperator struct {
	*OperatorBase
}

func (*PlusOperator) Result

func (o *PlusOperator) Result() int

type PlusOperatorFactory

type PlusOperatorFactory struct {
}

func (PlusOperatorFactory) Create

func (PlusOperatorFactory) Create() Operator

Jump to

Keyboard shortcuts

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