@Override public boolean equals(Object o) { if (!(o instanceof DriverInfo)) return false; DriverInfo a = (DriverInfo) o; if (!this.getShortName().equals(a.getShortName())) return false; return a.getDriver() == this.getDriver(); }
public int compareTo(DriverInfo o) { int c = this.getShortName().compareTo(o.getShortName()); if (c != 0) { return c; } else { String cn1 = this.getClassName(); String cn2 = o.getClassName(); if ((cn1 != null) && (cn2 != null)) { return cn1.compareTo(cn2); } else { if (cn1 == null) { return 1; } else { return -1; } } } }