Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/shared/model/FacetFilter.java @ 831:9101b4d64666
Datacage: Re-written ToLoad to feature the new filter models.
flys-client/trunk@2539 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Tue, 23 Aug 2011 16:58:07 +0000 |
parents | 3dde14f0bd98 |
children | 29966a53cfeb |
comparison
equal
deleted
inserted
replaced
830:3dde14f0bd98 | 831:9101b4d64666 |
---|---|
30 | 30 |
31 public void setNum(String num) { | 31 public void setNum(String num) { |
32 this.num = num; | 32 this.num = num; |
33 } | 33 } |
34 | 34 |
35 protected static boolean equals(String a, String b) { | |
36 if (a == null && b == null) return true; | |
37 if (a == null && b != null) return false; | |
38 if (a != null && b == null) return false; | |
39 return a.equals(b); | |
40 } | |
41 | |
35 public boolean equals(Object other) { | 42 public boolean equals(Object other) { |
36 if (!(other instanceof FacetFilter)) { | 43 if (!(other instanceof FacetFilter)) { |
37 return false; | 44 return false; |
38 } | 45 } |
39 FacetFilter o = (FacetFilter)other; | 46 FacetFilter o = (FacetFilter)other; |
40 return o.name.equals(name) && o.num.equals(num); | 47 return equals(o.name, name) && equals(o.num, num); |
41 } | 48 } |
42 } | 49 } |
43 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : | 50 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |