public final class NumericConstant extends java.lang.Object implements Atom
| Modifier and Type | Field and Description |
|---|---|
static NumericConstant |
ONE |
static NumericConstant |
TWO |
static NumericConstant |
ZERO |
| Constructor and Description |
|---|
NumericConstant(java.lang.Number value)
Creates a numeric constant based on a
Number representation. |
NumericConstant(java.lang.String text)
Creates a numeric constant.
|
| Modifier and Type | Method and Description |
|---|---|
<T> T |
accept(NodeVisitor<T> visitor)
Accept a visitor to process this node.
|
java.lang.String |
getText()
Get the text content for this nodes
|
java.lang.Number |
getValue()
Returns the number representation of this constant.
|
java.lang.String |
toString() |
public static final NumericConstant ZERO
public static final NumericConstant ONE
public static final NumericConstant TWO
public NumericConstant(java.lang.String text)
text - the text representationjava.lang.NumberFormatException - if the text is not in a numeric formatpublic NumericConstant(java.lang.Number value)
Number representation.value - the number representationpublic java.lang.Number getValue()
public java.lang.String getText()
Atompublic <T> T accept(NodeVisitor<T> visitor)
ExpressionNodeaccept in interface ExpressionNodeT - the type of the visitorvisitor - The visitorpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2010 - 2023 Adobe. All Rights Reserved