hydra.langs.sql.ansi.BooleanValueExpression Maven / Gradle / Ivy
package hydra.langs.sql.ansi;
import java.io.Serializable;
public abstract class BooleanValueExpression implements Serializable {
public static final hydra.core.Name NAME = new hydra.core.Name("hydra/langs/sql/ansi.BooleanValueExpression");
private BooleanValueExpression () {
}
public abstract R accept(Visitor visitor) ;
public interface Visitor {
R visit(Term instance) ;
R visit(Or instance) ;
}
public interface PartialVisitor extends Visitor {
default R otherwise(BooleanValueExpression instance) {
throw new IllegalStateException("Non-exhaustive patterns when matching: " + (instance));
}
default R visit(Term instance) {
return otherwise((instance));
}
default R visit(Or instance) {
return otherwise((instance));
}
}
public static final class Term extends hydra.langs.sql.ansi.BooleanValueExpression implements Serializable {
public final hydra.langs.sql.ansi.BooleanTerm value;
public Term (hydra.langs.sql.ansi.BooleanTerm value) {
this.value = value;
}
@Override
public boolean equals(Object other) {
if (!(other instanceof Term)) {
return false;
}
Term o = (Term) (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 Or extends hydra.langs.sql.ansi.BooleanValueExpression implements Serializable {
public final hydra.langs.sql.ansi.BooleanValueExpression_Or value;
public Or (hydra.langs.sql.ansi.BooleanValueExpression_Or value) {
this.value = value;
}
@Override
public boolean equals(Object other) {
if (!(other instanceof Or)) {
return false;
}
Or o = (Or) (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