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