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