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

com.google.gerrit.server.permissions.AutoValue_PermissionCollection_SeenRule Maven / Gradle / Ivy

There is a newer version: 3.10.1
Show newest version
package com.google.gerrit.server.permissions;

import com.google.gerrit.common.Nullable;
import com.google.gerrit.entities.AccountGroup;
import javax.annotation.processing.Generated;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_PermissionCollection_SeenRule extends PermissionCollection.SeenRule {

  private final String refPattern;

  private final AccountGroup.UUID group;

  AutoValue_PermissionCollection_SeenRule(
      String refPattern,
      @Nullable AccountGroup.UUID group) {
    if (refPattern == null) {
      throw new NullPointerException("Null refPattern");
    }
    this.refPattern = refPattern;
    this.group = group;
  }

  @Override
  public String refPattern() {
    return refPattern;
  }

  @Nullable
  @Override
  public AccountGroup.UUID group() {
    return group;
  }

  @Override
  public String toString() {
    return "SeenRule{"
        + "refPattern=" + refPattern + ", "
        + "group=" + group
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof PermissionCollection.SeenRule) {
      PermissionCollection.SeenRule that = (PermissionCollection.SeenRule) o;
      return this.refPattern.equals(that.refPattern())
          && (this.group == null ? that.group() == null : this.group.equals(that.group()));
    }
    return false;
  }

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy