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

com.google.errorprone.refaster.AutoValue_UForLoop 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_UForLoop extends UForLoop {

  private final ImmutableList initializer;

  private final UExpression condition;

  private final ImmutableList update;

  private final USimpleStatement statement;

  AutoValue_UForLoop(
      ImmutableList initializer,
      @Nullable UExpression condition,
      ImmutableList update,
      USimpleStatement statement) {
    if (initializer == null) {
      throw new NullPointerException("Null initializer");
    }
    this.initializer = initializer;
    this.condition = condition;
    if (update == null) {
      throw new NullPointerException("Null update");
    }
    this.update = update;
    if (statement == null) {
      throw new NullPointerException("Null statement");
    }
    this.statement = statement;
  }

  @Override
  public ImmutableList getInitializer() {
    return initializer;
  }

  @Nullable
  @Override
  public UExpression getCondition() {
    return condition;
  }

  @Override
  public ImmutableList getUpdate() {
    return update;
  }

  @Override
  public USimpleStatement getStatement() {
    return statement;
  }

  @Override
  public String toString() {
    return "UForLoop{"
        + "initializer=" + initializer + ", "
        + "condition=" + condition + ", "
        + "update=" + update + ", "
        + "statement=" + statement
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof UForLoop) {
      UForLoop that = (UForLoop) o;
      return this.initializer.equals(that.getInitializer())
          && (this.condition == null ? that.getCondition() == null : this.condition.equals(that.getCondition()))
          && this.update.equals(that.getUpdate())
          && this.statement.equals(that.getStatement());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= initializer.hashCode();
    h$ *= 1000003;
    h$ ^= (condition == null) ? 0 : condition.hashCode();
    h$ *= 1000003;
    h$ ^= update.hashCode();
    h$ *= 1000003;
    h$ ^= statement.hashCode();
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy