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