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

com.google.errorprone.refaster.AutoValue_UTry Maven / Gradle / Ivy

There is a newer version: 2.27.1
Show newest version
package com.google.errorprone.refaster;

import com.google.common.collect.ImmutableList;
import javax.annotation.Nullable;
import javax.annotation.processing.Generated;

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

  private final ImmutableList> resources;

  private final UBlock block;

  private final ImmutableList catches;

  private final UBlock finallyBlock;

  AutoValue_UTry(
      ImmutableList> resources,
      UBlock block,
      ImmutableList catches,
      @Nullable UBlock finallyBlock) {
    if (resources == null) {
      throw new NullPointerException("Null resources");
    }
    this.resources = resources;
    if (block == null) {
      throw new NullPointerException("Null block");
    }
    this.block = block;
    if (catches == null) {
      throw new NullPointerException("Null catches");
    }
    this.catches = catches;
    this.finallyBlock = finallyBlock;
  }

  @Override
  public ImmutableList> getResources() {
    return resources;
  }

  @Override
  public UBlock getBlock() {
    return block;
  }

  @Override
  public ImmutableList getCatches() {
    return catches;
  }

  @Nullable
  @Override
  public UBlock getFinallyBlock() {
    return finallyBlock;
  }

  @Override
  public String toString() {
    return "UTry{"
        + "resources=" + resources + ", "
        + "block=" + block + ", "
        + "catches=" + catches + ", "
        + "finallyBlock=" + finallyBlock
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof UTry) {
      UTry that = (UTry) o;
      return this.resources.equals(that.getResources())
          && this.block.equals(that.getBlock())
          && this.catches.equals(that.getCatches())
          && (this.finallyBlock == null ? that.getFinallyBlock() == null : this.finallyBlock.equals(that.getFinallyBlock()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= resources.hashCode();
    h$ *= 1000003;
    h$ ^= block.hashCode();
    h$ *= 1000003;
    h$ ^= catches.hashCode();
    h$ *= 1000003;
    h$ ^= (finallyBlock == null) ? 0 : finallyBlock.hashCode();
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy