@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; IOrder other = null; try { other = (IOrder) obj; } catch (ClassCastException e) { return false; } if (!description.equals(other.getDescription())) return false; if (!deadline.equals(other.getDeadline())) return false; if (estimatedTime == null) { if (other.getEstimatedTime() != null) return false; } else if (!estimatedTime.equals(other.getEstimatedTime())) return false; if (!garageholder.equals(other.getGarageHolder())) return false; if (!orderTime.equals(other.getOrderTime())) return false; if (pendingCars != other.getPendingCars()) return false; if (quantity != other.getQuantity()) return false; return true; }