All Downloads are FREE. Search and download functionalities are using the official Maven repository.

hydra.ext.io.shex.syntax.RdfLiteral_Alts_Option Maven / Gradle / Ivy

There is a newer version: 0.8.1
Show newest version
// Note: this is an automatically generated file. Do not edit.

package hydra.ext.io.shex.syntax;

import java.io.Serializable;

public abstract class RdfLiteral_Alts_Option implements Serializable {
  public static final hydra.core.Name TYPE_NAME = new hydra.core.Name("hydra/ext/io/shex/syntax.RdfLiteral.Alts.Option");
  
  public static final hydra.core.Name FIELD_NAME_LANG_TAG = new hydra.core.Name("langTag");
  
  public static final hydra.core.Name FIELD_NAME_SEQUENCE = new hydra.core.Name("sequence");
  
  private RdfLiteral_Alts_Option () {
  
  }
  
  public abstract  R accept(Visitor visitor) ;
  
  public interface Visitor {
    R visit(LangTag instance) ;
    
    R visit(Sequence instance) ;
  }
  
  public interface PartialVisitor extends Visitor {
    default R otherwise(RdfLiteral_Alts_Option instance) {
      throw new IllegalStateException("Non-exhaustive patterns when matching: " + (instance));
    }
    
    default R visit(LangTag instance) {
      return otherwise((instance));
    }
    
    default R visit(Sequence instance) {
      return otherwise((instance));
    }
  }
  
  public static final class LangTag extends hydra.ext.io.shex.syntax.RdfLiteral_Alts_Option implements Serializable {
    public final hydra.ext.io.shex.syntax.LangTag value;
    
    public LangTag (hydra.ext.io.shex.syntax.LangTag value) {
      java.util.Objects.requireNonNull((value));
      this.value = value;
    }
    
    @Override
    public boolean equals(Object other) {
      if (!(other instanceof LangTag)) {
        return false;
      }
      LangTag o = (LangTag) (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 Sequence extends hydra.ext.io.shex.syntax.RdfLiteral_Alts_Option implements Serializable {
    public final hydra.ext.io.shex.syntax.Datatype value;
    
    public Sequence (hydra.ext.io.shex.syntax.Datatype 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);
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy