hydra.ext.fr.inria.coq.syntax.OpenBinders 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.fr.inria.coq.syntax;
import java.io.Serializable;
public abstract class OpenBinders implements Serializable {
public static final hydra.core.Name TYPE_NAME = new hydra.core.Name("hydra/ext/fr/inria/coq/syntax.OpenBinders");
public static final hydra.core.Name FIELD_NAME_TYPE = new hydra.core.Name("type");
public static final hydra.core.Name FIELD_NAME_BINDERS = new hydra.core.Name("binders");
private OpenBinders () {
}
public abstract R accept(Visitor visitor) ;
public interface Visitor {
R visit(Type instance) ;
R visit(Binders instance) ;
}
public interface PartialVisitor extends Visitor {
default R otherwise(OpenBinders instance) {
throw new IllegalStateException("Non-exhaustive patterns when matching: " + (instance));
}
default R visit(Type instance) {
return otherwise((instance));
}
default R visit(Binders instance) {
return otherwise((instance));
}
}
public static final class Type extends hydra.ext.fr.inria.coq.syntax.OpenBinders implements Serializable {
public final hydra.ext.fr.inria.coq.syntax.TypeBinders value;
public Type (hydra.ext.fr.inria.coq.syntax.TypeBinders value) {
java.util.Objects.requireNonNull((value));
this.value = value;
}
@Override
public boolean equals(Object other) {
if (!(other instanceof Type)) {
return false;
}
Type o = (Type) (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 Binders extends hydra.ext.fr.inria.coq.syntax.OpenBinders implements Serializable {
public final java.util.List value;
public Binders (java.util.List value) {
java.util.Objects.requireNonNull((value));
this.value = value;
}
@Override
public boolean equals(Object other) {
if (!(other instanceof Binders)) {
return false;
}
Binders o = (Binders) (other);
return value.equals(o.value);
}
@Override
public int hashCode() {
return 2 * value.hashCode();
}
@Override
public R accept(Visitor visitor) {
return visitor.visit(this);
}
}
}