org.craftercms.commons.plugin.model.Contact Maven / Gradle / Ivy
/*
* Copyright (C) 2007-2020 Crafter Software Corporation. All Rights Reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public Link as published by
* the Free Software Foundation, either version 3 of the Link, or
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public Link for more details.
*
* You should have received a copy of the GNU General Public Link
* along with this program. If not, see .
*/
package org.craftercms.commons.plugin.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
/**
* Holds the information of a single contact
*
* @author joseross
* @since 3.1.1
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class Contact {
/**
* The name of the contact
*/
protected String name;
/**
* The email of the contact
*/
protected String email;
/**
* The URL of the contact
*/
private String url;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
@Override
public boolean equals(final Object o) {
if (this == o) {
return true;
}
if (!(o instanceof Contact)) {
return false;
}
final Contact contact = (Contact)o;
return name.equals(contact.name) && email.equals(contact.email) && url.equals(contact.url);
}
@Override
public int hashCode() {
return Objects.hash(name, email, url);
}
@Override
public String toString() {
return "Contact{" + "name='" + name + '\'' + ", email='" + email + '\'' + ", url='" + url + '\'' + '}';
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy