hydra.ext.org.ansi.sql.syntax.BooleanLiteral 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
// Note: this is an automatically generated file. Do not edit.
package hydra.ext.org.ansi.sql.syntax;
import java.io.Serializable;
public abstract class BooleanLiteral implements Serializable {
public static final hydra.core.Name TYPE_NAME = new hydra.core.Name("hydra/ext/org/ansi/sql/syntax.BooleanLiteral");
public static final hydra.core.Name FIELD_NAME_T_R_U_E = new hydra.core.Name("tRUE");
public static final hydra.core.Name FIELD_NAME_F_A_L_S_E = new hydra.core.Name("fALSE");
public static final hydra.core.Name FIELD_NAME_U_N_K_N_O_W_N = new hydra.core.Name("uNKNOWN");
private BooleanLiteral () {
}
public abstract R accept(Visitor visitor) ;
public interface Visitor {
R visit(TRUE instance) ;
R visit(FALSE instance) ;
R visit(UNKNOWN instance) ;
}
public interface PartialVisitor extends Visitor {
default R otherwise(BooleanLiteral instance) {
throw new IllegalStateException("Non-exhaustive patterns when matching: " + (instance));
}
default R visit(TRUE instance) {
return otherwise((instance));
}
default R visit(FALSE instance) {
return otherwise((instance));
}
default R visit(UNKNOWN instance) {
return otherwise((instance));
}
}
public static final class TRUE extends hydra.ext.org.ansi.sql.syntax.BooleanLiteral implements Serializable {
public TRUE () {
}
@Override
public boolean equals(Object other) {
if (!(other instanceof TRUE)) {
return false;
}
TRUE o = (TRUE) (other);
return true;
}
@Override
public int hashCode() {
return 0;
}
@Override
public R accept(Visitor visitor) {
return visitor.visit(this);
}
}
public static final class FALSE extends hydra.ext.org.ansi.sql.syntax.BooleanLiteral implements Serializable {
public FALSE () {
}
@Override
public boolean equals(Object other) {
if (!(other instanceof FALSE)) {
return false;
}
FALSE o = (FALSE) (other);
return true;
}
@Override
public int hashCode() {
return 0;
}
@Override
public R accept(Visitor visitor) {
return visitor.visit(this);
}
}
public static final class UNKNOWN extends hydra.ext.org.ansi.sql.syntax.BooleanLiteral implements Serializable {
public UNKNOWN () {
}
@Override
public boolean equals(Object other) {
if (!(other instanceof UNKNOWN)) {
return false;
}
UNKNOWN o = (UNKNOWN) (other);
return true;
}
@Override
public int hashCode() {
return 0;
}
@Override
public R accept(Visitor visitor) {
return visitor.visit(this);
}
}
}