Class Int16ToBigint


  • public class Int16ToBigint
    extends PrimitiveFunction
    Primitive function which converts an int16 (16-bit signed integer) to a bigint (arbitrary-precision integer). This conversion is lossless.
    • Constructor Summary

      Constructors 
      Constructor Description
      Int16ToBigint()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static java.math.BigInteger apply​(java.lang.Short value)
      Converts a Short (16-bit signed integer) value to a BigInteger.
      protected java.util.function.Function<java.util.List<Term>,​java.util.function.Function<Context,​java.util.function.Function<Graph,​Either<InContext<Error_>,​Term>>>> implementation()
      Provides the implementation of this primitive function.
      Name name()
      Returns the unique name identifying this primitive function.
      TypeScheme type()
      Returns the type scheme for this function: int16 -> bigint.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Int16ToBigint

        public Int16ToBigint()
    • Method Detail

      • name

        public Name name()
        Returns the unique name identifying this primitive function.
        Specified by:
        name in class PrimitiveFunction
        Returns:
        the function name "hydra.lib.literals.int16ToBigint"
      • type

        public TypeScheme type()
        Returns the type scheme for this function: int16 -> bigint.
        Specified by:
        type in class PrimitiveFunction
        Returns:
        the type scheme representing the function signature
      • implementation

        protected java.util.function.Function<java.util.List<Term>,​java.util.function.Function<Context,​java.util.function.Function<Graph,​Either<InContext<Error_>,​Term>>>> implementation()
        Provides the implementation of this primitive function.
        Specified by:
        implementation in class PrimitiveFunction
        Returns:
        a function that converts int16 terms to bigint terms
      • apply

        public static java.math.BigInteger apply​(java.lang.Short value)
        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