public final class StringConstant extends java.lang.Object implements Atom
'hello world'
).Modifier and Type | Field and Description |
---|---|
static StringConstant |
EMPTY
The empty string constant.
|
Constructor and Description |
---|
StringConstant(java.lang.String text)
Create a string constant node.
|
Modifier and Type | Method and Description |
---|---|
<T> T |
accept(NodeVisitor<T> visitor)
Accept a visitor to process this node.
|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getText()
Gets the string content
|
int |
hashCode() |
java.lang.String |
toString() |
public static final StringConstant EMPTY
public StringConstant(java.lang.String text)
text
- the string content (without its original quotes)public <T> T accept(NodeVisitor<T> visitor)
ExpressionNode
accept
in interface ExpressionNode
T
- the type of the visitorvisitor
- The visitorpublic java.lang.String getText()
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2022 The Apache Software Foundation. All rights reserved.