Package org.jruby.ast
Class FixnumNode
java.lang.Object
org.jruby.ast.Node
org.jruby.ast.NumericNode
org.jruby.ast.FixnumNode
- All Implemented Interfaces:
LiteralValue,SideEffectFree,ILiteralNode
Represents an integer 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) booleanlonggetValue()Gets the value.inthashCode()literalValue(Ruby runtime) negate()voidsetValue(long value) Not all interesting info in the AST is from Node data.Methods inherited from class org.jruby.ast.Node
containsVariableAssignment, createList, createList, createList, createList, executesOnce, getFile, getLine, getNodeName, isNewline, isNil, needsDefinitionCheck, setLine, setNewline, toString, toString, toStringInternal, unsetNewline
-
Constructor Details
-
FixnumNode
public FixnumNode(int line, long value)
-
-
Method Details
-
accept
-
getNodeType
- Specified by:
getNodeTypein classNode- Returns:
- the nodeId
-
negate
- Overrides:
negatein classNumericNode
-
getValue
public long getValue()Gets the value.- Returns:
- Returns a long
-
setValue
public void setValue(long value) -
childNodes
- Specified by:
childNodesin classNode
-
toStringExtraInfo
Description copied from class:NodeNot all interesting info in the AST is from Node data. This method will print out anything else of note (e.g. FixnumNode's long value).- Overrides:
toStringExtraInfoin classNode- Returns:
- null for no extra info or something otherwise.
-
equals
-
hashCode
public int hashCode() -
literalValue
- Specified by:
literalValuein interfaceLiteralValue
-