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

org.graylog2.storage.AutoValue_SearchVersion Maven / Gradle / Ivy

There is a newer version: 6.1.4
Show newest version
package org.graylog2.storage;

import com.github.zafarkhaja.semver.Version;
import javax.annotation.processing.Generated;

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

  private final SearchVersion.Distribution distribution;

  private final Version version;

  AutoValue_SearchVersion(
      SearchVersion.Distribution distribution,
      Version version) {
    if (distribution == null) {
      throw new NullPointerException("Null distribution");
    }
    this.distribution = distribution;
    if (version == null) {
      throw new NullPointerException("Null version");
    }
    this.version = version;
  }

  @Override
  public SearchVersion.Distribution distribution() {
    return distribution;
  }

  @Override
  public Version version() {
    return version;
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof SearchVersion) {
      SearchVersion that = (SearchVersion) o;
      return this.distribution.equals(that.distribution())
          && this.version.equals(that.version());
    }
    return false;
  }

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy