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> Taccept(NodeVisitor<T> iVisitor) booleandoublegetValue()Gets the value.inthashCode()literalValue(Ruby runtime) negate()voidsetValue(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:
getNodeTypein classNode- Returns:
- the nodeId
-
accept
-
negate
- Overrides:
negatein 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:
childNodesin classNode
-
literalValue
- Specified by:
literalValuein interfaceLiteralValue
-