Documentos de Académico
Documentos de Profesional
Documentos de Cultura
entidades;
import java.util.Date;
import java.util.Objects;
/**
*
* @author Gerardo
*
*
*/
public class Persona {
private String nombre;
private String apellido;
private String genero;
private String nacionalidad;
private int edad;
private int id;
private Date fechaDeNacim;
public Persona() {
}
@Override
public int hashCode() {
int hash = 5;
hash = 29 * hash + Objects.hashCode(this.genero);
hash = 29 * hash + this.id;
return hash;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final Persona other = (Persona) obj;
if (this.id != other.id) {
return false;
}
if (!Objects.equals(this.nombre, other.nombre)) {
return false;
}
if (!Objects.equals(this.apellido, other.apellido)) {
return false;
}
return Objects.equals(this.genero, other.genero);
}
@Override
public String toString() {
return "Persona{" + "nombre=" + nombre + ", apellido=" + apellido + ",
genero=" + genero + ", nacionalidad=" + nacionalidad + ", edad=" + edad + ", id=" +
id + ", fechaDeNacim=" + fechaDeNacim + '}';
}