{
final int TITLE_SEARCH = 0;
final int ARTIST_SEARCH = 1;
final int ALBUM_SEARCH = 2;
final int FILENAME_SEARCH = 3;
TagInfo pli = ((PlaylistItem) pI.get(i)).getTagInfo();
remove[i] = false;
boolean found = false;
int searchType;
if (artist.isSelected())
{
searchType = ARTIST_SEARCH;
}
else if (album.isSelected())
{
searchType = ALBUM_SEARCH;
}
else if (title.isSelected())
{
searchType = TITLE_SEARCH;
}
else
{
searchType = -1;
}
for (int j = 0; j <= FILENAME_SEARCH; j++)
{
String listString = "";
if (pli == null)
{
if (searchType != -1)
{
break;
}
j = FILENAME_SEARCH;
}
else if (searchType != -1)
{
j = searchType;
}
switch (j)
{
case (TITLE_SEARCH):
if (pli.getTitle() != null) listString = pli.getTitle().toLowerCase();
break;
case (ARTIST_SEARCH):
if (pli.getArtist() != null) listString = pli.getArtist().toLowerCase();
break;
case (ALBUM_SEARCH):
if (pli.getAlbum() != null) listString = pli.getAlbum().toLowerCase();
break;
case (FILENAME_SEARCH):
String location = ((PlaylistItem) pI.get(i)).getLocation().toLowerCase();
listString = location.substring(location.lastIndexOf(sep) + 1, location.lastIndexOf("."));
break;