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

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



package com.google.gerrit.server;

import com.google.common.collect.ImmutableSortedSet;
import com.google.gerrit.common.Nullable;
import javax.annotation.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 ImmutableSortedSet labels;

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

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

  @Override
  public ImmutableSortedSet 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