@Test public void isNaturalNumber() { assertTrue((Node.from(Short.valueOf((short) 1))).isNaturalNumber()); assertTrue((Node.from(Integer.valueOf(1))).isNaturalNumber()); assertTrue((Node.from(Long.valueOf(1))).isNaturalNumber()); assertFalse((Node.from(Float.valueOf((float) 1.0))).isNaturalNumber()); assertFalse((Node.from(Double.valueOf(1.0))).isNaturalNumber()); }
public boolean isNaturalNumber() { return !isFloatingPointNumber(); }
NumberNode extends Node { public boolean isNaturalNumber() { return !isFloatingPointNumber(); } }
NumberNode extends Node { public boolean isNaturalNumber() { return !isFloatingPointNumber(); } NumberNode(Number value, SourceLocation sourceLocation); }
NumberNode extends Node { public boolean isNaturalNumber() { return !isFloatingPointNumber(); } 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 { public boolean isNaturalNumber() { return !isFloatingPointNumber(); } 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();  }