1 package org.rpi.plugin.lastfm; 2 3 public class BlackList { 4 5 private String artist = ""; 6 private String title = ""; 7 8 public String getArtist() { 9 return artist; 10 } 11 public void setArtist(String artist) { 12 this.artist = artist; 13 } 14 public String getTitle() { 15 return title; 16 } 17 public void setTitle(String title) { 18 this.title = title; 19 } 20 21 public boolean matches(String artist, String title) 22 { 23 if(this.artist.equalsIgnoreCase("")) 24 { 25 if(this.title.equalsIgnoreCase(title)) 26 return true; 27 } 28 else if(this.title.equalsIgnoreCase("")) 29 { 30 if(this.artist.equalsIgnoreCase(artist)) 31 return true; 32 } 33 else 34 { 35 if(this.artist.equalsIgnoreCase(artist) && this.title.equalsIgnoreCase(title)) 36 return true; 37 } 38 return false; 39 } 40 41 public String toString() 42 { 43 return "Artist: " + artist + " Title: " + title; 44 } 45 46 }