@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Mail mail = (Mail) o; if (key != null ? !key.equals(mail.key) : mail.key != null) return false; return true; }
@Override public int hashCode() { return key != null ? key.hashCode() : 0; }
public Long getKey() { return null == key ? null : key.getKey(); }