com.verisec.frejaeid.client.beans.general.Email Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of FrejaEidClient Show documentation
Show all versions of FrejaEidClient Show documentation
Freja eID Client is a client library aimed to ease integration of relying party back-end systems with Freja eID Relying Party API.
package com.verisec.frejaeid.client.beans.general;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Objects;
/**
* Email contains information about user's email address. It can be requested as
* attribute to return.
*
*/
public class Email {
private final String emailAddress;
@JsonCreator
public Email(@JsonProperty("emailAddress") String emailAddress) {
this.emailAddress = emailAddress;
}
public String getEmailAddress() {
return emailAddress;
}
@Override
public int hashCode() {
return Objects.hash(emailAddress);
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final Email other = (Email) obj;
if (!Objects.equals(this.emailAddress, other.emailAddress)) {
return false;
}
return true;
}
@Override
public String toString() {
return "Email{" + "emailAddress=" + emailAddress + '}';
}
}