hydra.langs.java.syntax.AssignmentExpression Maven / Gradle / Ivy
package hydra.langs.java.syntax;
import java.io.Serializable;
public abstract class AssignmentExpression implements Serializable {
public static final hydra.core.Name NAME = new hydra.core.Name("hydra/langs/java/syntax.AssignmentExpression");
private AssignmentExpression () {
}
public abstract R accept(Visitor visitor) ;
public interface Visitor {
R visit(Conditional instance) ;
R visit(Assignment instance) ;
}
public interface PartialVisitor extends Visitor {
default R otherwise(AssignmentExpression instance) {
throw new IllegalStateException("Non-exhaustive patterns when matching: " + (instance));
}
default R visit(Conditional instance) {
return otherwise((instance));
}
default R visit(Assignment instance) {
return otherwise((instance));
}
}
public static final class Conditional extends hydra.langs.java.syntax.AssignmentExpression implements Serializable {
public final hydra.langs.java.syntax.ConditionalExpression value;
public Conditional (hydra.langs.java.syntax.ConditionalExpression value) {
this.value = value;
}
@Override
public boolean equals(Object other) {
if (!(other instanceof Conditional)) {
return false;
}
Conditional o = (Conditional) (other);
return value.equals(o.value);
}
@Override
public int hashCode() {
return 2 * value.hashCode();
}
@Override
public R accept(Visitor visitor) {
return visitor.visit(this);
}
}
public static final class Assignment extends hydra.langs.java.syntax.AssignmentExpression implements Serializable {
public final hydra.langs.java.syntax.Assignment value;
public Assignment (hydra.langs.java.syntax.Assignment value) {
this.value = value;
}
@Override
public boolean equals(Object other) {
if (!(other instanceof Assignment)) {
return false;
}
Assignment o = (Assignment) (other);
return value.equals(o.value);
}
@Override
public int hashCode() {
return 2 * value.hashCode();
}
@Override
public R accept(Visitor visitor) {
return visitor.visit(this);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy