package io.github.imsmobile.fahrplan.model;

import com.google.common.base.Objects;

public class FavoriteModelItem {
    private final String from;
    private final String to;

    FavoriteModelItem(String from, String to) {
        this.from = from;
        this.to = to;
    }

    public String getFrom() {
        return from;
    }

    public String getTo() {
        return to;
    }

    @Override
    public String toString() {
        return from + " \u279C " + to;
    }

    @Override
    public boolean equals(Object obj) {
        return obj instanceof FavoriteModelItem && Objects.equal(((FavoriteModelItem) obj).getFrom().toLowerCase(), from.toLowerCase()) && Objects.equal(((FavoriteModelItem) obj).getTo().toLowerCase(), to.toLowerCase());
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(to.toLowerCase(), from.toLowerCase());
    }
}

@@ -526,18 +526,16 @@
 Object o
-bj
 ) %7B%0A    
@@ -542,29 +542,111 @@
     
-return obj instanceof
+if (this == o) return true;%0A        if (o == null %7C%7C getClass() != o.getClass()) return false;%0A%0A       
  Fav
@@ -660,34 +660,23 @@
 delItem 
-&& Objects.equal((
+that = 
 (Favorit
@@ -692,260 +692,356 @@
 m) o
-bj).getFrom().toLowerCase(), from.toLowerCase()) && Objects.equal(((FavoriteModelItem) obj).getTo().toLowerCase(), to.toLowerCase());%0A    %7D%0A%0A    @Override%0A    public int hashCode() %7B%0A        return Objects.hashCode(to.toLowerCase(), from.toLowerCase())
+;%0A%0A        if (from != null ? !from.equals(that.from) : that.from != null) return false;%0A        return to != null ? to.equals(that.to) : that.to == null;%0A%0A    %7D%0A%0A    @Override%0A    public int hashCode() %7B%0A        int result = from != null ? from.hashCode() : 0;%0A        result = 31 * result + (to != null ? to.hashCode() : 0);%0A        return result
 ;%0A  

Use auto generated hashcode and equals