Package hydra.lib.literals
Class BigintToInt64
java.lang.Object
hydra.tools.PrimitiveFunction
hydra.lib.literals.BigintToInt64
Primitive function which converts a bigint (arbitrary-precision integer) to an int64 (64-bit signed integer).
This conversion may result in loss of precision if the value is outside the int64 range.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Longapply(BigInteger value) Converts a BigInteger value to a Long (64-bit signed integer).Provides the implementation of this primitive function.name()Returns the unique name identifying this primitive function.type()Returns the type scheme for this function: bigint -> int64.Methods inherited from class hydra.tools.PrimitiveFunction
term, toNative
-
Constructor Details
-
BigintToInt64
public BigintToInt64()
-
-
Method Details
-
name
Returns the unique name identifying this primitive function.- Specified by:
namein classPrimitiveFunction- Returns:
- the function name "hydra.lib.literals.bigintToInt64"
-
type
Returns the type scheme for this function: bigint -> int64.- Specified by:
typein classPrimitiveFunction- Returns:
- the type scheme representing the function signature
-
implementation
Provides the implementation of this primitive function.- Specified by:
implementationin classPrimitiveFunction- Returns:
- a function that converts bigint terms to int64 terms
-
apply
Converts a BigInteger value to a Long (64-bit signed integer).- Parameters:
value- the BigInteger value to convert- Returns:
- the Long representation of the value
-