Package hydra.lib.literals
Class Int16ToBigint
java.lang.Object
hydra.tools.PrimitiveFunction
hydra.lib.literals.Int16ToBigint
Primitive function which converts an int16 (16-bit signed integer) to a bigint (arbitrary-precision integer).
This conversion is lossless.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BigIntegerConverts a Short (16-bit signed integer) value to a BigInteger.Provides the implementation of this primitive function.name()Returns the unique name identifying this primitive function.type()Returns the type scheme for this function: int16 -> bigint.Methods inherited from class hydra.tools.PrimitiveFunction
term, toNative
-
Constructor Details
-
Int16ToBigint
public Int16ToBigint()
-
-
Method Details
-
name
Returns the unique name identifying this primitive function.- Specified by:
namein classPrimitiveFunction- Returns:
- the function name "hydra.lib.literals.int16ToBigint"
-
type
Returns the type scheme for this function: int16 -> bigint.- 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 int16 terms to bigint terms
-
apply
Converts a Short (16-bit signed integer) value to a BigInteger.- Parameters:
value- the Short value to convert- Returns:
- the BigInteger representation of the value
-