info.bliki.wiki.template.expr.ast.ASTNode Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bliki-core Show documentation
Show all versions of bliki-core Show documentation
This is the core project.
The newest version!
package info.bliki.wiki.template.expr.ast;
/**
* The basic node for a parsed expression string
*
*/
public abstract class ASTNode {
protected final String fStringValue;
protected ASTNode(final String value) {
fStringValue = value;
}
/**
* Returns the parsed string of this node.
*
* @return null
if there's another representation in the
* derived class
*/
public String getString() {
return fStringValue;
}
@Override
public String toString() {
return fStringValue;
}
public boolean dependsOn(String variableName) {
return false;
}
public ASTNode derivative(String variableName) {
return new IntegerNode("0");
}
@Override
public abstract boolean equals(Object obj);
@Override
public int hashCode() {
return fStringValue.hashCode();
}
}