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

edu.stanford.protege.webprotege.criteria.AutoValue_NumericValueCriteria Maven / Gradle / Ivy

package edu.stanford.protege.webprotege.criteria;

import com.fasterxml.jackson.annotation.JsonIgnore;
import javax.annotation.processing.Generated;

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

  private final String name;

  private final double value;

  AutoValue_NumericValueCriteria(
      String name,
      double value) {
    if (name == null) {
      throw new NullPointerException("Null name");
    }
    this.name = name;
    this.value = value;
  }

  @JsonIgnore
  @Override
  protected String getName() {
    return name;
  }

  @Override
  public double getValue() {
    return value;
  }

  @Override
  public String toString() {
    return "NumericValueCriteria{"
        + "name=" + name + ", "
        + "value=" + value
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof NumericValueCriteria) {
      NumericValueCriteria that = (NumericValueCriteria) o;
      return this.name.equals(that.getName())
          && Double.doubleToLongBits(this.value) == Double.doubleToLongBits(that.getValue());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= name.hashCode();
    h$ *= 1000003;
    h$ ^= (int) ((Double.doubleToLongBits(value) >>> 32) ^ Double.doubleToLongBits(value));
    return h$;
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy