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

hydra.ext.io.shex.syntax.RdfLiteral 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 class RdfLiteral implements Serializable {
  public static final hydra.core.Name TYPE_NAME = new hydra.core.Name("hydra/ext/io/shex/syntax.RdfLiteral");
  
  public static final hydra.core.Name FIELD_NAME_STRING = new hydra.core.Name("string");
  
  public static final hydra.core.Name FIELD_NAME_ALTS = new hydra.core.Name("alts");
  
  public final hydra.ext.io.shex.syntax.String_ string;
  
  public final hydra.util.Opt alts;
  
  public RdfLiteral (hydra.ext.io.shex.syntax.String_ string, hydra.util.Opt alts) {
    java.util.Objects.requireNonNull((string));
    java.util.Objects.requireNonNull((alts));
    this.string = string;
    this.alts = alts;
  }
  
  @Override
  public boolean equals(Object other) {
    if (!(other instanceof RdfLiteral)) {
      return false;
    }
    RdfLiteral o = (RdfLiteral) (other);
    return string.equals(o.string) && alts.equals(o.alts);
  }
  
  @Override
  public int hashCode() {
    return 2 * string.hashCode() + 3 * alts.hashCode();
  }
  
  public RdfLiteral withString(hydra.ext.io.shex.syntax.String_ string) {
    java.util.Objects.requireNonNull((string));
    return new RdfLiteral(string, alts);
  }
  
  public RdfLiteral withAlts(hydra.util.Opt alts) {
    java.util.Objects.requireNonNull((alts));
    return new RdfLiteral(string, alts);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy