@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Navitia other = (Navitia) obj; if (location == null) { if (other.location != null) return false; } else if (!location.equals(other.location)) return false; if (arrival == null) { if (other.arrival != null) return false; } else if (!arrival.equals(other.arrival)) return false; if (date == null) { if (other.date != null) return false; } else if (!date.equals(other.date)) return false; return true; }