go.incremental – github.com/GeertJohan/go.incremental Index | Files | Directories

package incremental

import "github.com/GeertJohan/go.incremental"

package incremental provides concurency-safe incremental numbers.

This package was created by a simple piece of code located in the gen subdirectory. Please modify that command if you want to modify this package.

Index

Types

type Int

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

func (*Int) Last

func (i *Int) Last() int

Last returns the number (int) that was returned by the most recent call to this instance's Next()

func (*Int) Next

func (i *Int) Next() int

Next returns with an integer that is exactly one higher as the previous call to Next() for this Int

func (*Int) Set

func (i *Int) Set(value int)

Set changes the increment to given value, the succeeding call to Next() will return the given value+1

type Int16

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

func (*Int16) Last

func (i *Int16) Last() int16

Last returns the number (int16) that was returned by the most recent call to this instance's Next()

func (*Int16) Next

func (i *Int16) Next() int16

Next returns with an integer that is exactly one higher as the previous call to Next() for this Int16

func (*Int16) Set

func (i *Int16) Set(value int16)

Set changes the increment to given value, the succeeding call to Next() will return the given value+1

type Int32

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

func (*Int32) Last

func (i *Int32) Last() int32

Last returns the number (int32) that was returned by the most recent call to this instance's Next()

func (*Int32) Next

func (i *Int32) Next() int32

Next returns with an integer that is exactly one higher as the previous call to Next() for this Int32

func (*Int32) Set

func (i *Int32) Set(value int32)

Set changes the increment to given value, the succeeding call to Next() will return the given value+1

type Int64

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

func (*Int64) Last

func (i *Int64) Last() int64

Last returns the number (int64) that was returned by the most recent call to this instance's Next()

func (*Int64) Next

func (i *Int64) Next() int64

Next returns with an integer that is exactly one higher as the previous call to Next() for this Int64

func (*Int64) Set

func (i *Int64) Set(value int64)

Set changes the increment to given value, the succeeding call to Next() will return the given value+1

type Int8

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

func (*Int8) Last

func (i *Int8) Last() int8

Last returns the number (int8) that was returned by the most recent call to this instance's Next()

func (*Int8) Next

func (i *Int8) Next() int8

Next returns with an integer that is exactly one higher as the previous call to Next() for this Int8

func (*Int8) Set

func (i *Int8) Set(value int8)

Set changes the increment to given value, the succeeding call to Next() will return the given value+1

type Uint

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

func (*Uint) Last

func (i *Uint) Last() uint

Last returns the number (uint) that was returned by the most recent call to this instance's Next()

func (*Uint) Next

func (i *Uint) Next() uint

Next returns with an integer that is exactly one higher as the previous call to Next() for this Uint

func (*Uint) Set

func (i *Uint) Set(value uint)

Set changes the increment to given value, the succeeding call to Next() will return the given value+1

type Uint16

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

func (*Uint16) Last

func (i *Uint16) Last() uint16

Last returns the number (uint16) that was returned by the most recent call to this instance's Next()

func (*Uint16) Next

func (i *Uint16) Next() uint16

Next returns with an integer that is exactly one higher as the previous call to Next() for this Uint16

func (*Uint16) Set

func (i *Uint16) Set(value uint16)

Set changes the increment to given value, the succeeding call to Next() will return the given value+1

type Uint32

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

func (*Uint32) Last

func (i *Uint32) Last() uint32

Last returns the number (uint32) that was returned by the most recent call to this instance's Next()

func (*Uint32) Next

func (i *Uint32) Next() uint32

Next returns with an integer that is exactly one higher as the previous call to Next() for this Uint32

func (*Uint32) Set

func (i *Uint32) Set(value uint32)

Set changes the increment to given value, the succeeding call to Next() will return the given value+1

type Uint64

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

func (*Uint64) Last

func (i *Uint64) Last() uint64

Last returns the number (uint64) that was returned by the most recent call to this instance's Next()

func (*Uint64) Next

func (i *Uint64) Next() uint64

Next returns with an integer that is exactly one higher as the previous call to Next() for this Uint64

func (*Uint64) Set

func (i *Uint64) Set(value uint64)

Set changes the increment to given value, the succeeding call to Next() will return the given value+1

type Uint8

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

func (*Uint8) Last

func (i *Uint8) Last() uint8

Last returns the number (uint8) that was returned by the most recent call to this instance's Next()

func (*Uint8) Next

func (i *Uint8) Next() uint8

Next returns with an integer that is exactly one higher as the previous call to Next() for this Uint8

func (*Uint8) Set

func (i *Uint8) Set(value uint8)

Set changes the increment to given value, the succeeding call to Next() will return the given value+1

Source Files

doc.go int.go int16.go int32.go int64.go int8.go uint.go uint16.go uint32.go uint64.go uint8.go

Directories

PathSynopsis
example
gen
Version
v1.0.0 (latest)
Published
Mar 16, 2019
Platform
windows/amd64
Imports
1 packages
Last checked
2 months ago

Tools for package owners.