What would be the function of ListIterator
? I have a variable of type List
, which receives the information from my PostgreSQL Database, I need to access the information of this variable of type List
but when I use the get()
method to select the information of a certain Index I am having as return the reference of this record and not your information. With the listIterator I can access the information of my variable of type List?
def i = 0;
def x = 0;
def z = transportadorasBanco.size();
def y = listaTransportadoras.size();
logger.info("Registros BDM: "+ z)
logger.info("Registros Banco de Dados PostgreSQL: "+ y)
def itemBDM = []
def itemPost = []
while (x <= (z - 1)){
while (i <= (y - 1)){
if (transportadorasBanco.get(x).toString().equals(listaTransportadoras.get(i).toString())){
logger.info("POSSICAO BDM: " +x)
logger.info("POSSICAO POSTGRESQL: " +i)
logger.info("IGUAIS")
logger.info(transportadorasBanco.get(x).toString())
logger.info(listaTransportadoras.get(i).toString())
logger.info("")
}
else {
logger.info("POSSICAO BDM: " +x)
logger.info("POSSICAO POSTGRESQL: " +i)
logger.info("DIFERENTES")
logger.info(transportadorasBanco.get(x).toString())
logger.info(listaTransportadoras.get(i).toString())
logger.info("")
}
i++;
}
x++;
i = 0;
}