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

org.flyte.api.v1.AutoValue_KeyValuePair Maven / Gradle / Ivy

There is a newer version: 0.4.60
Show newest version
package org.flyte.api.v1;

import javax.annotation.Nullable;
import javax.annotation.processing.Generated;

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

  private final String key;

  @Nullable
  private final String value;

  AutoValue_KeyValuePair(
      String key,
      @Nullable String value) {
    if (key == null) {
      throw new NullPointerException("Null key");
    }
    this.key = key;
    this.value = value;
  }

  @Override
  public String key() {
    return key;
  }

  @Nullable
  @Override
  public String value() {
    return value;
  }

  @Override
  public String toString() {
    return "KeyValuePair{"
        + "key=" + key + ", "
        + "value=" + value
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof KeyValuePair) {
      KeyValuePair that = (KeyValuePair) o;
      return this.key.equals(that.key())
          && (this.value == null ? that.value() == null : this.value.equals(that.value()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= key.hashCode();
    h$ *= 1000003;
    h$ ^= (value == null) ? 0 : value.hashCode();
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy