incrementor

package
v0.0.0-...-dc806d7 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxValueDefault = MaxInt
	MinValueDefault = 0
)

Incrementor internal Number Value's default Limits.

View Source
const (
	MaxInt int = (1<<bits.UintSize)/2 - 1
	MinInt int = (1 << bits.UintSize) / -2
)

Built-in Type Limits.

View Source
const (
	ErrfMaxValue = "Upper Limit Value Error: %v"
)

Errors.

Variables

This section is empty.

Functions

This section is empty.

Types

type Incrementor

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

func New

func New() Incrementor

Creates a new initialized Incrementor.

func (Incrementor) GetNumber

func (this Incrementor) GetNumber() int

Returns the internal Number.

func (*Incrementor) IncrementNumber

func (this *Incrementor) IncrementNumber()

Increments the internal Number.

func (*Incrementor) SetMaximumValue

func (this *Incrementor) SetMaximumValue(
	maxValue int,
) error

Sets the maximum allowed Value for the internal Number.

Jump to

Keyboard shortcuts

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