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

com.google.gerrit.server.AutoValue_StarredChangesUtil_StarRef Maven / Gradle / Ivy

There is a newer version: 3.11.0-rc3
Show newest version
package com.google.gerrit.server;

import com.google.gerrit.common.Nullable;
import java.util.NavigableSet;
import javax.annotation.processing.Generated;
import org.eclipse.jgit.lib.Ref;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_StarredChangesUtil_StarRef extends StarredChangesUtil.StarRef {

  private final Ref ref;

  private final NavigableSet labels;

  AutoValue_StarredChangesUtil_StarRef(
      @Nullable Ref ref,
      NavigableSet labels) {
    this.ref = ref;
    if (labels == null) {
      throw new NullPointerException("Null labels");
    }
    this.labels = labels;
  }

  @Nullable
  @Override
  public Ref ref() {
    return ref;
  }

  @Override
  public NavigableSet labels() {
    return labels;
  }

  @Override
  public String toString() {
    return "StarRef{"
        + "ref=" + ref + ", "
        + "labels=" + labels
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof StarredChangesUtil.StarRef) {
      StarredChangesUtil.StarRef that = (StarredChangesUtil.StarRef) o;
      return (this.ref == null ? that.ref() == null : this.ref.equals(that.ref()))
          && this.labels.equals(that.labels());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= (ref == null) ? 0 : ref.hashCode();
    h$ *= 1000003;
    h$ ^= labels.hashCode();
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy