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

com.github.kristofa.brave.AutoValue_BraveRunnable Maven / Gradle / Ivy

There is a newer version: 3.9.1
Show newest version

package com.github.kristofa.brave;

import javax.annotation.Generated;

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

  private final Runnable wrappedRunnable;
  private final ServerSpanThreadBinder serverSpanThreadBinder;
  private final ServerSpan currentServerSpan;

  AutoValue_BraveRunnable(
      Runnable wrappedRunnable,
      ServerSpanThreadBinder serverSpanThreadBinder,
      @com.github.kristofa.brave.internal.Nullable ServerSpan currentServerSpan) {
    if (wrappedRunnable == null) {
      throw new NullPointerException("Null wrappedRunnable");
    }
    this.wrappedRunnable = wrappedRunnable;
    if (serverSpanThreadBinder == null) {
      throw new NullPointerException("Null serverSpanThreadBinder");
    }
    this.serverSpanThreadBinder = serverSpanThreadBinder;
    this.currentServerSpan = currentServerSpan;
  }

  @Override
  Runnable wrappedRunnable() {
    return wrappedRunnable;
  }

  @Override
  ServerSpanThreadBinder serverSpanThreadBinder() {
    return serverSpanThreadBinder;
  }

  @com.github.kristofa.brave.internal.Nullable
  @Override
  ServerSpan currentServerSpan() {
    return currentServerSpan;
  }

  @Override
  public String toString() {
    return "BraveRunnable{"
        + "wrappedRunnable=" + wrappedRunnable + ", "
        + "serverSpanThreadBinder=" + serverSpanThreadBinder + ", "
        + "currentServerSpan=" + currentServerSpan
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof BraveRunnable) {
      BraveRunnable that = (BraveRunnable) o;
      return (this.wrappedRunnable.equals(that.wrappedRunnable()))
           && (this.serverSpanThreadBinder.equals(that.serverSpanThreadBinder()))
           && ((this.currentServerSpan == null) ? (that.currentServerSpan() == null) : this.currentServerSpan.equals(that.currentServerSpan()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h = 1;
    h *= 1000003;
    h ^= wrappedRunnable.hashCode();
    h *= 1000003;
    h ^= serverSpanThreadBinder.hashCode();
    h *= 1000003;
    h ^= (currentServerSpan == null) ? 0 : currentServerSpan.hashCode();
    return h;
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy