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

dev.cel.common.internal.AutoValue_BidiConverter Maven / Gradle / Ivy

The newest version!
package dev.cel.common.internal;

// Generated by com.google.auto.value.processor.AutoValueProcessor
final class AutoValue_BidiConverter extends BidiConverter {

  private final Converter forwardConverter;

  private final Converter backwardConverter;

  AutoValue_BidiConverter(
      Converter forwardConverter,
      Converter backwardConverter) {
    if (forwardConverter == null) {
      throw new NullPointerException("Null forwardConverter");
    }
    this.forwardConverter = forwardConverter;
    if (backwardConverter == null) {
      throw new NullPointerException("Null backwardConverter");
    }
    this.backwardConverter = backwardConverter;
  }

  @Override
  public Converter forwardConverter() {
    return forwardConverter;
  }

  @Override
  public Converter backwardConverter() {
    return backwardConverter;
  }

  @Override
  public String toString() {
    return "BidiConverter{"
        + "forwardConverter=" + forwardConverter + ", "
        + "backwardConverter=" + backwardConverter
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof BidiConverter) {
      BidiConverter that = (BidiConverter) o;
      return this.forwardConverter.equals(that.forwardConverter())
          && this.backwardConverter.equals(that.backwardConverter());
    }
    return false;
  }

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy