Class DoubleConstant

  • All Implemented Interfaces:
    Value

    public final class DoubleConstant
    extends Constant
    Represents a double constant.
    • Constructor Detail

      • DoubleConstant

        public DoubleConstant​(double value)
        Creates a double constant with the given value.
        Parameters:
        value - the double value
    • Method Detail

      • of

        public static DoubleConstant of​(double value)
        Creates a double constant, using cached instances for common values.
        Parameters:
        value - the double value
        Returns:
        a DoubleConstant instance
      • getType

        public IRType getType()
        Description copied from interface: Value
        Gets the IR type of this value.
        Returns:
        the IR type
      • getValue

        public Double getValue()
        Description copied from class: Constant
        Gets the value of this constant.
        Specified by:
        getValue in class Constant
        Returns:
        the constant value
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object