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

ai.grakn.graql.admin.AutoValue_RelationPlayer Maven / Gradle / Ivy

There is a newer version: 1.4.3
Show newest version

package ai.grakn.graql.admin;

import java.util.Optional;
import javax.annotation.CheckReturnValue;
import javax.annotation.Generated;

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

  private final Optional role;
  private final VarPatternAdmin rolePlayer;

  AutoValue_RelationPlayer(
      Optional role,
      VarPatternAdmin rolePlayer) {
    if (role == null) {
      throw new NullPointerException("Null role");
    }
    this.role = role;
    if (rolePlayer == null) {
      throw new NullPointerException("Null rolePlayer");
    }
    this.rolePlayer = rolePlayer;
  }

  @CheckReturnValue
  @Override
  public Optional getRole() {
    return role;
  }

  @CheckReturnValue
  @Override
  public VarPatternAdmin getRolePlayer() {
    return rolePlayer;
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof RelationPlayer) {
      RelationPlayer that = (RelationPlayer) o;
      return (this.role.equals(that.getRole()))
           && (this.rolePlayer.equals(that.getRolePlayer()));
    }
    return false;
  }

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy