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

com.proofpoint.platform.sample.AutoValue_Person Maven / Gradle / Ivy

There is a newer version: 3.23
Show newest version
package com.proofpoint.platform.sample;

import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.processing.Generated;

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

  private final String email;

  private final String name;

  AutoValue_Person(
      String email,
      String name) {
    if (email == null) {
      throw new NullPointerException("Null email");
    }
    this.email = email;
    if (name == null) {
      throw new NullPointerException("Null name");
    }
    this.name = name;
  }

  @JsonProperty
  @Override
  public String getEmail() {
    return email;
  }

  @JsonProperty
  @Override
  public String getName() {
    return name;
  }

  @Override
  public String toString() {
    return "Person{"
        + "email=" + email + ", "
        + "name=" + name
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof Person) {
      Person that = (Person) o;
      return this.email.equals(that.getEmail())
          && this.name.equals(that.getName());
    }
    return false;
  }

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy