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

com.google.gerrit.extensions.validators.AutoValue_CommentForValidation Maven / Gradle / Ivy

There is a newer version: 3.10.1
Show newest version
package com.google.gerrit.extensions.validators;

import javax.annotation.processing.Generated;

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

  private final CommentForValidation.CommentSource source;

  private final CommentForValidation.CommentType type;

  private final String text;

  private final int approximateSize;

  AutoValue_CommentForValidation(
      CommentForValidation.CommentSource source,
      CommentForValidation.CommentType type,
      String text,
      int approximateSize) {
    if (source == null) {
      throw new NullPointerException("Null source");
    }
    this.source = source;
    if (type == null) {
      throw new NullPointerException("Null type");
    }
    this.type = type;
    if (text == null) {
      throw new NullPointerException("Null text");
    }
    this.text = text;
    this.approximateSize = approximateSize;
  }

  @Override
  public CommentForValidation.CommentSource getSource() {
    return source;
  }

  @Override
  public CommentForValidation.CommentType getType() {
    return type;
  }

  @Override
  public String getText() {
    return text;
  }

  @Override
  public int getApproximateSize() {
    return approximateSize;
  }

  @Override
  public String toString() {
    return "CommentForValidation{"
        + "source=" + source + ", "
        + "type=" + type + ", "
        + "text=" + text + ", "
        + "approximateSize=" + approximateSize
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof CommentForValidation) {
      CommentForValidation that = (CommentForValidation) o;
      return this.source.equals(that.getSource())
          && this.type.equals(that.getType())
          && this.text.equals(that.getText())
          && this.approximateSize == that.getApproximateSize();
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= source.hashCode();
    h$ *= 1000003;
    h$ ^= type.hashCode();
    h$ *= 1000003;
    h$ ^= text.hashCode();
    h$ *= 1000003;
    h$ ^= approximateSize;
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy