Class FloatConstant

  • All Implemented Interfaces:
    Value

    public final class FloatConstant
    extends Constant
    Represents a float constant.
    • Constructor Detail

      • FloatConstant

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

      • of

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

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

        public Float 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