/** * Executes <tt>procedure</tt> for each key/value entry in the * map. * * @param procedure a <code>TOObjectIntProcedure</code> value * @return false if the loop over the entries terminated because * the procedure returned false for some entry. */ public boolean forEachEntry(TObjectIntProcedure procedure) { Object[] keys = _set; int[] values = _values; for (int i = keys.length; i-- > 0;) { if (keys[i] != null && keys[i] != REMOVED && ! procedure.execute(keys[i],values[i])) { return false; } } return true; }
/** * Retains only those entries in the map for which the procedure * returns a true value. * * @param procedure determines which entries to keep * @return true if the map was modified. */ public boolean retainEntries(TObjectIntProcedure procedure) { boolean modified = false; Object[] keys = _set; int[] values = _values; for (int i = keys.length; i-- > 0;) { if (keys[i] != null && keys[i] != REMOVED && ! procedure.execute(keys[i],values[i])) { removeAt(i); modified = true; } } return modified; }
keepGoing = proc.execute(mos, lastMsg); sentLastChunk = lastMsg == 1 && keepGoing;
keepGoing = proc.execute(mos, lastMsg); sentLastChunk = lastMsg == 1 && keepGoing;
keepGoing = proc.execute(mos, lastMsg); sentLastChunk = lastMsg == 1 && keepGoing;
keepGoing = proc.execute(chunkEntries, lastMsg); sentLastChunk = lastMsg == 1 && keepGoing; } finally {