primitive

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Primitive

type Primitive[T constraints.Ordered] struct {
	Value T
}

Primitive is a type that can be used to represent a primitive type.

func Of

func Of[T constraints.Ordered](value T) Primitive[T]

Of returns a new primitive type with the given value.

func OfList

func OfList[T constraints.Ordered](value ...T) []Primitive[T]

OfList returns a new primitive type with the given values.

func (Primitive[T]) Clone

func (p Primitive[T]) Clone() Primitive[T]

Clone returns a new primitive type with the same value as this one.

func (Primitive[T]) CompareTo

func (p Primitive[T]) CompareTo(other Primitive[T]) comparable.Compared

CompareTo compares this primitive type with the given one.

Jump to

Keyboard shortcuts

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