Item item = iterator.next(); // call next only once here if (item.getTitle().equals("Something")) { tempposition = item.getPosition(); }
Item item = iterator.next(); // call next only once here if (item.getTitle().equals("Something")) { tempposition = item.getPosition(); }