hydra.langs.haskell.ast.ImportExportSpec_Subspec Maven / Gradle / Ivy
package hydra.langs.haskell.ast;
import java.io.Serializable;
public abstract class ImportExportSpec_Subspec implements Serializable {
public static final hydra.core.Name NAME = new hydra.core.Name("hydra/langs/haskell/ast.ImportExportSpec.Subspec");
private ImportExportSpec_Subspec () {
}
public abstract R accept(Visitor visitor) ;
public interface Visitor {
R visit(All instance) ;
R visit(List instance) ;
}
public interface PartialVisitor extends Visitor {
default R otherwise(ImportExportSpec_Subspec instance) {
throw new IllegalStateException("Non-exhaustive patterns when matching: " + (instance));
}
default R visit(All instance) {
return otherwise((instance));
}
default R visit(List instance) {
return otherwise((instance));
}
}
public static final class All extends hydra.langs.haskell.ast.ImportExportSpec_Subspec implements Serializable {
public All () {
}
@Override
public boolean equals(Object other) {
if (!(other instanceof All)) {
return false;
}
All o = (All) (other);
return true;
}
@Override
public int hashCode() {
return 0;
}
@Override
public R accept(Visitor visitor) {
return visitor.visit(this);
}
}
public static final class List extends hydra.langs.haskell.ast.ImportExportSpec_Subspec implements Serializable {
public final java.util.List value;
public List (java.util.List value) {
this.value = value;
}
@Override
public boolean equals(Object other) {
if (!(other instanceof List)) {
return false;
}
List o = (List) (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