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

org.graylog.plugins.views.search.rest.suggestions.AutoValue_SuggestionEntryDTO Maven / Gradle / Ivy

There is a newer version: 6.0.1
Show newest version
package org.graylog.plugins.views.search.rest.suggestions;

import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.Generated;

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

  private final String value;

  private final long occurrence;

  AutoValue_SuggestionEntryDTO(
      String value,
      long occurrence) {
    if (value == null) {
      throw new NullPointerException("Null value");
    }
    this.value = value;
    this.occurrence = occurrence;
  }

  @JsonProperty
  @Override
  public String value() {
    return value;
  }

  @JsonProperty
  @Override
  public long occurrence() {
    return occurrence;
  }

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

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof SuggestionEntryDTO) {
      SuggestionEntryDTO that = (SuggestionEntryDTO) o;
      return this.value.equals(that.value())
          && this.occurrence == that.occurrence();
    }
    return false;
  }

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy