package strategy;
public class User {
/**
* Форматтер - статичный, ибо ни к чему дублировать его
* для каждого пользователя
*/
private int ID;
super();
ID = id;
this.fio = fio;
this.regDate = date;
}
return fio;
}
public int getID() {
return ID;
}
public Date getRegDate
() { return regDate;
}
public int hashCode() {
final int PRIME = 31;
int result = 1;
result = PRIME * result + ID;
result = PRIME * result + ((fio == null) ? 0 : fio.hashCode());
result = PRIME * result + ((regDate == null) ? 0 : regDate.hashCode());
return result;
}
public boolean equals
(Object obj
) { if (this == obj)
return true;
if (!(obj instanceof User))
return false;
final User other = (User) obj;
if (ID != other.ID)
return false;
if (fio == null) {
if (other.fio != null)
return false;
} else if (!fio.equals(other.fio))
return false;
if (regDate == null) {
if (other.regDate != null)
return false;
} else if (!regDate.equals(other.regDate))
return false;
return true;
}
return super.toString() + " |ID=" + ID
+ "|fio=" + fio + "|regDate="
+ df.format(regDate);
}
}