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

org.robolectric.shadows.AutoValue_ShadowTrace_AsyncTraceSection Maven / Gradle / Ivy

package org.robolectric.shadows;

import javax.annotation.Generated;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_ShadowTrace_AsyncTraceSection extends ShadowTrace.AsyncTraceSection {

  private final String sectionName;

  private final Integer cookie;

  private AutoValue_ShadowTrace_AsyncTraceSection(
      String sectionName,
      Integer cookie) {
    this.sectionName = sectionName;
    this.cookie = cookie;
  }

  @Override
  public String getSectionName() {
    return sectionName;
  }

  @Override
  public Integer getCookie() {
    return cookie;
  }

  @Override
  public String toString() {
    return "AsyncTraceSection{"
        + "sectionName=" + sectionName + ", "
        + "cookie=" + cookie
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof ShadowTrace.AsyncTraceSection) {
      ShadowTrace.AsyncTraceSection that = (ShadowTrace.AsyncTraceSection) o;
      return this.sectionName.equals(that.getSectionName())
          && this.cookie.equals(that.getCookie());
    }
    return false;
  }

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

  static final class Builder extends ShadowTrace.AsyncTraceSection.Builder {
    private String sectionName;
    private Integer cookie;
    Builder() {
    }
    @Override
    public ShadowTrace.AsyncTraceSection.Builder setSectionName(String sectionName) {
      if (sectionName == null) {
        throw new NullPointerException("Null sectionName");
      }
      this.sectionName = sectionName;
      return this;
    }
    @Override
    public ShadowTrace.AsyncTraceSection.Builder setCookie(Integer cookie) {
      if (cookie == null) {
        throw new NullPointerException("Null cookie");
      }
      this.cookie = cookie;
      return this;
    }
    @Override
    public ShadowTrace.AsyncTraceSection build() {
      if (this.sectionName == null
          || this.cookie == null) {
        StringBuilder missing = new StringBuilder();
        if (this.sectionName == null) {
          missing.append(" sectionName");
        }
        if (this.cookie == null) {
          missing.append(" cookie");
        }
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_ShadowTrace_AsyncTraceSection(
          this.sectionName,
          this.cookie);
    }
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy