Package hydra.lib.literals
Class BigintToUint16
java.lang.Object
hydra.tools.PrimitiveFunction
hydra.lib.literals.BigintToUint16
Primitive function which converts a bigint (arbitrary-precision integer) to a uint16 (16-bit unsigned integer).
This conversion may result in loss of precision if the value is outside the uint16 range.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Characterapply(BigInteger value) Converts a BigInteger value to a Character (16-bit unsigned 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 -> uint16.Methods inherited from class hydra.tools.PrimitiveFunction
term, toNative
-
Constructor Details
-
BigintToUint16
public BigintToUint16()
-
-
Method Details
-
name
Returns the unique name identifying this primitive function.- Specified by:
namein classPrimitiveFunction- Returns:
- the function name "hydra.lib.literals.bigintToUint16"
-
type
Returns the type scheme for this function: bigint -> uint16.- 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 uint16 terms
-
apply
Converts a BigInteger value to a Character (16-bit unsigned integer).- Parameters:
value- the BigInteger value to convert- Returns:
- the Character representation of the value
-