Package org.jruby.ast
Class FloatNode
java.lang.Object
org.jruby.ast.Node
org.jruby.ast.NumericNode
org.jruby.ast.FloatNode
- All Implemented Interfaces:
LiteralValue
,SideEffectFree
,ILiteralNode
Represents a float literal.
-
Field Summary
Fields inherited from class org.jruby.ast.Node
containsVariableAssignment, newline
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> T
accept
(NodeVisitor<T> iVisitor) boolean
double
getValue()
Gets the value.int
hashCode()
literalValue
(Ruby runtime) negate()
void
setValue
(double value) Sets the valueMethods inherited from class org.jruby.ast.Node
containsVariableAssignment, createList, createList, createList, createList, executesOnce, getFile, getLine, getNodeName, isNewline, isNil, needsDefinitionCheck, setLine, setNewline, toString, toString, toStringExtraInfo, toStringInternal, unsetNewline
-
Constructor Details
-
FloatNode
public FloatNode(int line, double value)
-
-
Method Details
-
getNodeType
- Specified by:
getNodeType
in classNode
- Returns:
- the nodeId
-
accept
-
negate
- Overrides:
negate
in classNumericNode
-
getValue
public double getValue()Gets the value.- Returns:
- Returns a double
-
equals
-
hashCode
public int hashCode() -
setValue
public void setValue(double value) Sets the value- Parameters:
value
- to set
-
childNodes
- Specified by:
childNodes
in classNode
-
literalValue
- Specified by:
literalValue
in interfaceLiteralValue
-