Moved code to reduce feature envy.

This commit is contained in:
Paul Hawke 2017-12-29 08:32:58 -06:00 committed by maskara
parent e589d0eb6f
commit 4f4587fd4d
2 changed files with 21 additions and 4 deletions

View file

@ -46,6 +46,18 @@ public class Place {
this.distance = distance;
}
public boolean hasWikipediaLink() {
return !(siteLinks == null || Uri.EMPTY.equals(siteLinks.getWikipediaLink()));
}
public boolean hasWikidataLink() {
return !(siteLinks == null || Uri.EMPTY.equals(siteLinks.getWikidataLink()));
}
public boolean hasCommonsLink() {
return !(siteLinks == null || Uri.EMPTY.equals(siteLinks.getCommonsLink()));
}
@Override
public boolean equals(Object o) {
if (o instanceof Place) {