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

org.molgenis.data.AutoValue_EntityKey Maven / Gradle / Ivy

There is a newer version: 8.4.5
Show newest version
package org.molgenis.data;

import javax.annotation.processing.Generated;

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

  private final String entityTypeId;

  private final Object id;

  AutoValue_EntityKey(
      String entityTypeId,
      Object id) {
    if (entityTypeId == null) {
      throw new NullPointerException("Null entityTypeId");
    }
    this.entityTypeId = entityTypeId;
    if (id == null) {
      throw new NullPointerException("Null id");
    }
    this.id = id;
  }

  @Override
  public String getEntityTypeId() {
    return entityTypeId;
  }

  @Override
  public Object getId() {
    return id;
  }

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

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof EntityKey) {
      EntityKey that = (EntityKey) o;
      return this.entityTypeId.equals(that.getEntityTypeId())
          && this.id.equals(that.getId());
    }
    return false;
  }

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy