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

com.github.rinde.rinsim.geom.AutoValue_MultiAttributeData Maven / Gradle / Ivy

There is a newer version: 4.4.6
Show newest version

package com.github.rinde.rinsim.geom;

import com.google.common.base.Optional;
import com.google.common.collect.ImmutableMap;
import javax.annotation.Generated;

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

  private final Optional length;
  private final Optional maxSpeed;
  private final ImmutableMap attributes;

  AutoValue_MultiAttributeData(
      Optional length,
      Optional maxSpeed,
      ImmutableMap attributes) {
    if (length == null) {
      throw new NullPointerException("Null length");
    }
    this.length = length;
    if (maxSpeed == null) {
      throw new NullPointerException("Null maxSpeed");
    }
    this.maxSpeed = maxSpeed;
    if (attributes == null) {
      throw new NullPointerException("Null attributes");
    }
    this.attributes = attributes;
  }

  @Override
  public Optional getLength() {
    return length;
  }

  @Override
  public Optional getMaxSpeed() {
    return maxSpeed;
  }

  @Override
  public ImmutableMap getAttributes() {
    return attributes;
  }

  @Override
  public String toString() {
    return "MultiAttributeData{"
        + "length=" + length + ", "
        + "maxSpeed=" + maxSpeed + ", "
        + "attributes=" + attributes
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof MultiAttributeData) {
      MultiAttributeData that = (MultiAttributeData) o;
      return (this.length.equals(that.getLength()))
           && (this.maxSpeed.equals(that.getMaxSpeed()))
           && (this.attributes.equals(that.getAttributes()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h = 1;
    h *= 1000003;
    h ^= this.length.hashCode();
    h *= 1000003;
    h ^= this.maxSpeed.hashCode();
    h *= 1000003;
    h ^= this.attributes.hashCode();
    return h;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy