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

com.google.j2cl.junit.apt.AutoValue_ParameterizedTestField Maven / Gradle / Ivy

The newest version!


package com.google.j2cl.junit.apt;

import javax.annotation.processing.Generated;

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

  private final String fieldName;
  private final int index;

  private AutoValue_ParameterizedTestField(
      String fieldName,
      int index) {
    this.fieldName = fieldName;
    this.index = index;
  }

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

  @Override
  public int index() {
    return index;
  }

  @Override
  public String toString() {
    return "ParameterizedTestField{"
         + "fieldName=" + fieldName + ", "
         + "index=" + index
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof ParameterizedTestField) {
      ParameterizedTestField that = (ParameterizedTestField) o;
      return (this.fieldName.equals(that.fieldName()))
           && (this.index == that.index());
    }
    return false;
  }

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

  static final class Builder extends ParameterizedTestField.Builder {
    private String fieldName;
    private Integer index;
    Builder() {
    }
    @Override
    ParameterizedTestField.Builder fieldName(String fieldName) {
      if (fieldName == null) {
        throw new NullPointerException("Null fieldName");
      }
      this.fieldName = fieldName;
      return this;
    }
    @Override
    ParameterizedTestField.Builder index(int index) {
      this.index = index;
      return this;
    }
    @Override
    ParameterizedTestField build() {
      String missing = "";
      if (this.fieldName == null) {
        missing += " fieldName";
      }
      if (this.index == null) {
        missing += " index";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_ParameterizedTestField(
          this.fieldName,
          this.index);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy