pessoal, haveria algum problema em remover um item deste modo? (usando break)
public synchronized void removeText(long id) throws RemoteException {
// TODO Auto-generated method stub
try{
Iterator<StoredData> ite = vDados.iterator();
while( ite.hasNext())
{
StoredData sd = ite.next();
if( sd.idText == id )
{
break ;
}
}
ite.remove();
}
catch(Exception e){
System.out.println("Error Remove"+ e.toString());
}
Outra pergunta, aproveitando esta: Neste caso, tem como usar synchronized em bloco ao invés de ser no método como acima?