import java.util.*;
public class Customer
{
private Integer id;
private String name;
private Integer age;
private String sex;
private String city;
public Integer getId()
{
return id;
}
public void setId(Integer id)
{
this.id=id;
}
public String getName()
{
return name;
}
public void setName(String name)
{
this.name=name;
}
public Integer getAge()
{
return age;
}
public void setAge(Integer age)
{
this.age=age;
}
public String getSex()
{
return sex;
}
public void setSex(String sex)
{
this.sex=sex;
}
public String getCity()
{
return city;
}
public void setCity(String city)
{
this.city=city;
}
@Override public String toString()
{
return "Customer [id="+id+", name="+name+", age="+age+", sex="+sex+", city="+city+"]";
}
@Override public boolean equals(Object otherObject)
{
if(this==otherObject) return true;
else if(otherObject==null) return false;
else if(!(otherObject instanceof Customer)) return false;
else
{
Customer other=(Customer)otherObject;
return Objects.equals(this.id,other.id)&&Objects.equals(this.name,other.name)
&&Objects.equals(this.age,other.age)&&Objects.equals(this.sex,other.sex)
&&Objects.equals(this.city,other.city);
}
}
@Override public int hashCode()
{
return Objects.hash(id,name,age,sex,city);
}
}