hydra.ext.org.ansi.sql.syntax.BooleanValueExpression Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hydra-ext Show documentation
Show all versions of hydra-ext Show documentation
Hydra language extensions in Java; models, coders, and utilities
The newest version!
// Note: this is an automatically generated file. Do not edit.
package hydra.ext.org.ansi.sql.syntax;
import java.io.Serializable;
public abstract class BooleanValueExpression implements Serializable {
public static final hydra.core.Name TYPE_NAME = new hydra.core.Name("hydra/ext/org/ansi/sql/syntax.BooleanValueExpression");
public static final hydra.core.Name FIELD_NAME_TERM = new hydra.core.Name("term");
public static final hydra.core.Name FIELD_NAME_OR = new hydra.core.Name("or");
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.ext.org.ansi.sql.syntax.BooleanValueExpression implements Serializable {
public final hydra.ext.org.ansi.sql.syntax.BooleanTerm value;
public Term (hydra.ext.org.ansi.sql.syntax.BooleanTerm value) {
java.util.Objects.requireNonNull((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.ext.org.ansi.sql.syntax.BooleanValueExpression implements Serializable {
public final hydra.ext.org.ansi.sql.syntax.BooleanValueExpression_Or value;
public Or (hydra.ext.org.ansi.sql.syntax.BooleanValueExpression_Or value) {
java.util.Objects.requireNonNull((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);
}
}
}