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

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

package org.robolectric.shadows;

import javax.annotation.Generated;

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

  private final String name;

  private final long value;

  private AutoValue_ShadowTrace_Counter(
      String name,
      long value) {
    this.name = name;
    this.value = value;
  }

  @Override
  public String getName() {
    return name;
  }

  @Override
  public long getValue() {
    return value;
  }

  @Override
  public String toString() {
    return "Counter{"
        + "name=" + name + ", "
        + "value=" + value
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof ShadowTrace.Counter) {
      ShadowTrace.Counter that = (ShadowTrace.Counter) o;
      return this.name.equals(that.getName())
          && this.value == that.getValue();
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= name.hashCode();
    h$ *= 1000003;
    h$ ^= (int) ((value >>> 32) ^ value);
    return h$;
  }

  static final class Builder extends ShadowTrace.Counter.Builder {
    private String name;
    private long value;
    private byte set$0;
    Builder() {
    }
    @Override
    public ShadowTrace.Counter.Builder setName(String name) {
      if (name == null) {
        throw new NullPointerException("Null name");
      }
      this.name = name;
      return this;
    }
    @Override
    public ShadowTrace.Counter.Builder setValue(long value) {
      this.value = value;
      set$0 |= 1;
      return this;
    }
    @Override
    public ShadowTrace.Counter build() {
      if (set$0 != 1
          || this.name == null) {
        StringBuilder missing = new StringBuilder();
        if (this.name == null) {
          missing.append(" name");
        }
        if ((set$0 & 1) == 0) {
          missing.append(" value");
        }
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_ShadowTrace_Counter(
          this.name,
          this.value);
    }
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy