@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((id == null) ? 0 : id.hashCode()); long temp; temp = Double.doubleToLongBits(lat); result = prime * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(lng); result = prime * result + (int) (temp ^ (temp >>> 32)); result = prime * result + ((order == null) ? 0 : order.hashCode()); result = prime * result + ((outlet == null) ? 0 : outlet.hashCode()); result = prime * result + ((time == null) ? 0 : time.hashCode()); return result; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Visit other = (Visit) obj; if (id == null) { if (other.id != null) return false; } else if (!id.equals(other.id)) return false; if (Double.doubleToLongBits(lat) != Double.doubleToLongBits(other.lat)) return false; if (Double.doubleToLongBits(lng) != Double.doubleToLongBits(other.lng)) return false; if (order == null) { if (other.order != null) return false; } else if (!order.equals(other.order)) return false; if (outlet == null) { if (other.outlet != null) return false; } else if (!outlet.equals(other.outlet)) return false; if (time == null) { if (other.time != null) return false; } else if (!time.equals(other.time)) return false; return true; }