I know I am probably over thinking this but I cannot seem to figure this out. I am trying to check if the value is null and if not to continue.
/**
*
*/
public Item getItem(String theItem)
{
Iterator iter = myItems.iterator();
while(iter.hasNext()) {
Item anItem = (Item) iter.next();
if(anItem.getName().equals(theItem)) {
return anItem;
}
}
if(anItem == null)
{
continue;
}
return null;
}