@Test public void getType() { NodeType type = Node.from(0).getType(); assertEquals(NodeType.NUMBER, type); assertEquals("number", type.toString()); }
@Override public NodeType getType() { return NodeType.NUMBER; }
NumberNode extends Node { @Override public NodeType getType() { return NodeType.NUMBER; } }
NumberNode extends Node { @Override public NodeType getType() { return NodeType.NUMBER; } NumberNode(Number value, SourceLocation sourceLocation); }
NumberNode extends Node { @Override public NodeType getType() { return NodeType.NUMBER; } NumberNode(Number value, SourceLocation sourceLocation); Number getValue(); boolean isNaturalNumber(); boolean isFloatingPointNumber(); @Override NodeType getType(); @Override R accept(NodeVisitor<R> visitor); @Override NumberNode expectNumberNode(String errorMessage); @Override Optional<NumberNode> asNumberNode(); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString(); }
NumberNode extends Node { @Override public NodeType getType() { return NodeType.NUMBER; } NumberNode(Number value, SourceLocation sourceLocation); Number getValue(); boolean isNaturalNumber(); boolean isFloatingPointNumber(); @Override NodeType getType(); @Override R accept(NodeVisitor<R> visitor); @Override NumberNode expectNumberNode(String errorMessage); @Override Optional<NumberNode> asNumberNode(); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString();  }