Ignore:
Timestamp:
2018-08-05T21:43:31+02:00 (6 years ago)
Author:
Don-vip
Message:

drop unitils library. It was only added to avoid implementing hashCode/equals in template engine and search classes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/template_engine/SearchExpressionCondition.java

    r13003 r14093  
    3737        return condition + " '" + text + '\'';
    3838    }
     39
     40    @Override
     41    public int hashCode() {
     42        final int prime = 31;
     43        int result = 1;
     44        result = prime * result + ((condition == null) ? 0 : condition.hashCode());
     45        result = prime * result + ((text == null) ? 0 : text.hashCode());
     46        return result;
     47    }
     48
     49    @Override
     50    public boolean equals(Object obj) {
     51        if (this == obj)
     52            return true;
     53        if (obj == null || getClass() != obj.getClass())
     54            return false;
     55        SearchExpressionCondition other = (SearchExpressionCondition) obj;
     56        if (condition == null) {
     57            if (other.condition != null)
     58                return false;
     59        } else if (!condition.equals(other.condition))
     60            return false;
     61        if (text == null) {
     62            if (other.text != null)
     63                return false;
     64        } else if (!text.equals(other.text))
     65            return false;
     66        return true;
     67    }
    3968}
Note: See TracChangeset for help on using the changeset viewer.