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

com.google.caliper.runner.worker.AutoValue_Command Maven / Gradle / Ivy

The newest version!
package com.google.caliper.runner.worker;

import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;

// Generated by com.google.auto.value.processor.AutoValueProcessor
final class AutoValue_Command extends Command {

  private final ImmutableMap environment;

  private final ImmutableList arguments;

  private AutoValue_Command(
      ImmutableMap environment,
      ImmutableList arguments) {
    this.environment = environment;
    this.arguments = arguments;
  }

  @Override
  public ImmutableMap environment() {
    return environment;
  }

  @Override
  public ImmutableList arguments() {
    return arguments;
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof Command) {
      Command that = (Command) o;
      return this.environment.equals(that.environment())
          && this.arguments.equals(that.arguments());
    }
    return false;
  }

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

  static final class Builder extends Command.Builder {
    private ImmutableMap.Builder environmentBuilder$;
    private ImmutableMap environment;
    private ImmutableList.Builder argumentsBuilder$;
    private ImmutableList arguments;
    Builder() {
    }
    @Override
    ImmutableMap.Builder environmentBuilder() {
      if (environmentBuilder$ == null) {
        environmentBuilder$ = ImmutableMap.builder();
      }
      return environmentBuilder$;
    }
    @Override
    ImmutableList.Builder argumentsBuilder() {
      if (argumentsBuilder$ == null) {
        argumentsBuilder$ = ImmutableList.builder();
      }
      return argumentsBuilder$;
    }
    @Override
    Command build() {
      if (environmentBuilder$ != null) {
        this.environment = environmentBuilder$.build();
      } else if (this.environment == null) {
        this.environment = ImmutableMap.of();
      }
      if (argumentsBuilder$ != null) {
        this.arguments = argumentsBuilder$.build();
      } else if (this.arguments == null) {
        this.arguments = ImmutableList.of();
      }
      return new AutoValue_Command(
          this.environment,
          this.arguments);
    }
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy