hydra.langs.shex.syntax.IriRange Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hydra-java Show documentation
Show all versions of hydra-java Show documentation
The Hydra language for strongly-typed transformations
// Note: this is an automatically generated file. Do not edit.
package hydra.langs.shex.syntax;
import java.io.Serializable;
public abstract class IriRange implements Serializable {
public static final hydra.core.Name TYPE_NAME = new hydra.core.Name("hydra/langs/shex/syntax.IriRange");
public static final hydra.core.Name FIELD_NAME_SEQUENCE = new hydra.core.Name("sequence");
public static final hydra.core.Name FIELD_NAME_SEQUENCE2 = new hydra.core.Name("sequence2");
private IriRange () {
}
public abstract R accept(Visitor visitor) ;
public interface Visitor {
R visit(Sequence instance) ;
R visit(Sequence2 instance) ;
}
public interface PartialVisitor extends Visitor {
default R otherwise(IriRange instance) {
throw new IllegalStateException("Non-exhaustive patterns when matching: " + (instance));
}
default R visit(Sequence instance) {
return otherwise((instance));
}
default R visit(Sequence2 instance) {
return otherwise((instance));
}
}
public static final class Sequence extends hydra.langs.shex.syntax.IriRange implements Serializable {
public final hydra.langs.shex.syntax.IriRange_Sequence value;
public Sequence (hydra.langs.shex.syntax.IriRange_Sequence value) {
java.util.Objects.requireNonNull((value));
this.value = value;
}
@Override
public boolean equals(Object other) {
if (!(other instanceof Sequence)) {
return false;
}
Sequence o = (Sequence) (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 Sequence2 extends hydra.langs.shex.syntax.IriRange implements Serializable {
public final java.util.List value;
public Sequence2 (java.util.List value) {
java.util.Objects.requireNonNull((value));
this.value = value;
}
@Override
public boolean equals(Object other) {
if (!(other instanceof Sequence2)) {
return false;
}
Sequence2 o = (Sequence2) (other);
return value.equals(o.value);
}
@Override
public int hashCode() {
return 2 * value.hashCode();
}
@Override
public R accept(Visitor visitor) {
return visitor.visit(this);
}
}
}