我有一个问题:有一种方法可以将迭代器直接递增到嵌套循环中吗?例子
while(budgets.iterator().hasNext()){
if(budgets.iterator().next().getTipoBudget()!="I"){
if(budgets.size()<maxInviate){
for(i=0; i<maxInviate ;i++){
if(budgetArray[i]==0 && budgets.iterator().hasNext()){
budgetArray[i] = budgets.iterator().next().getBudgetField();
}
}
i=0;
Set budgetSet = new HashSet<Integer>(Arrays.asList(budgetArray));
Integer min = Collections.min(budgetSet);
valueAdw = valueAdw + min;
for(i=0; i<maxInviate; i++){
budgetArray[i] = budgetArray[i] - valueAdw;
}
}else{
valueAdw = null;
valueAdwEnd = null;
campaigns.addLast(new Campaign(valueAdw, valueAdwEnd, (long) adwordsBudget.getZona().getAdwordsCode()));
}
}
}