integer

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: EPL-1.0 Imports: 5 Imported by: 0

Documentation

Overview

Package integer exposes JVM-faithful java.lang.Integer equivalents for code running on glojure. Each symbol is published two ways:

  • as a Go package-level value (used when gloat AOT-compiles a Clojure call site to a direct Go reference such as `compatinteger.ParseInt`); and
  • through glojure's pkgmap (used by the REPL and any dynamic resolution path).

Where the JVM signature is overloaded by arity (parseInt(s) / parseInt(s, radix), toString(i) / toString(i, radix), valueOf(int) / valueOf(String)), the bridge dispatches polymorphically at call time and returns int32 to match Java's int width.

Index

Constants

View Source
const (
	MIN_VALUE = jint.MIN_VALUE
	MAX_VALUE = jint.MAX_VALUE
	SIZE      = jint.SIZE
	BYTES     = jint.BYTES
)

Variables

This section is empty.

Functions

func BitCount

func BitCount(x any) int32

func Compare

func Compare(x, y any) int32

func HighestOneBit

func HighestOneBit(x any) int32

func LowestOneBit

func LowestOneBit(x any) int32

func Max

func Max(a, b any) int32

func Min

func Min(a, b any) int32

func NumberOfLeadingZeros

func NumberOfLeadingZeros(x any) int32

func NumberOfTrailingZeros

func NumberOfTrailingZeros(x any) int32

func ParseInt

func ParseInt(args ...any) any

ParseInt parses one or two args (string, optional radix) into int32.

func Reverse

func Reverse(x any) int32

func ReverseBytes

func ReverseBytes(x any) int32

func Signum

func Signum(x any) int32

func Sum

func Sum(a, b any) int32

func ToBinaryString

func ToBinaryString(x any) string

func ToHexString

func ToHexString(x any) string

func ToOctalString

func ToOctalString(x any) string

func ToString

func ToString(args ...any) string

ToString dispatches on arity: 1-arg returns decimal; 2-arg uses the radix.

func ValueOf

func ValueOf(x any) int32

ValueOf accepts a string (parsed as decimal) or a number (coerced to int32).

Types

This section is empty.

Jump to

Keyboard shortcuts

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