
org.jamon.node.ElseIfNode Maven / Gradle / Ivy
package org.jamon.node;
import org.jamon.api.Location;
public class ElseIfNode extends AbstractBodyNode {
public ElseIfNode(Location location, String condition) {
super(location);
if ((this.condition = condition) == null)
{ throw new NullPointerException(); }
}
@Override public void apply(Analysis analysis)
{
analysis.caseElseIfNode(this);
}
private final String condition;
public String getCondition() { return condition; }
@Override public boolean equals(Object obj) {
return obj != null
&& super.equals(obj)
&& condition.equals(((ElseIfNode) obj).condition)
;
}
@Override public int hashCode() {
return super.hashCode()
^ condition.hashCode()
;
}
@Override protected void propertiesToString(StringBuilder buffer) {
super.propertiesToString(buffer);
addProperty(buffer, "condition", condition);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy