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

ai.grakn.client.concept.AutoValue_RemoteRelationship Maven / Gradle / Ivy

The newest version!

package ai.grakn.client.concept;

import ai.grakn.client.Grakn;
import ai.grakn.concept.ConceptId;
import javax.annotation.Generated;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
 final class AutoValue_RemoteRelationship extends RemoteRelationship {

  private final Grakn.Transaction tx;
  private final ConceptId id;

  AutoValue_RemoteRelationship(
      Grakn.Transaction tx,
      ConceptId id) {
    if (tx == null) {
      throw new NullPointerException("Null tx");
    }
    this.tx = tx;
    if (id == null) {
      throw new NullPointerException("Null id");
    }
    this.id = id;
  }

  @Override
  Grakn.Transaction tx() {
    return tx;
  }

  @Override
  public ConceptId id() {
    return id;
  }

  @Override
  public String toString() {
    return "RemoteRelationship{"
        + "tx=" + tx + ", "
        + "id=" + id
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof RemoteRelationship) {
      RemoteRelationship that = (RemoteRelationship) o;
      return (this.tx.equals(that.tx()))
           && (this.id.equals(that.id()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h = 1;
    h *= 1000003;
    h ^= this.tx.hashCode();
    h *= 1000003;
    h ^= this.id.hashCode();
    return h;
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy