mirror of
				https://github.com/commons-app/apps-android-commons.git
				synced 2025-11-04 08:43:52 +01:00 
			
		
		
		
	Moved code to reduce feature envy.
This commit is contained in:
		
							parent
							
								
									e589d0eb6f
								
							
						
					
					
						commit
						4f4587fd4d
					
				
					 2 changed files with 21 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -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) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue