/** * Applies a procedure to each (key,value) pair of the receiver, if any. * Iteration order is guaranteed to be <i>identical</i> to the order used by method {@link #forEachKey(IntProcedure)}. * * @param procedure the procedure to be applied. Stops iteration if the procedure returns <tt>false</tt>, otherwise continues. * @return <tt>false</tt> if the procedure stopped before all keys where iterated over, <tt>true</tt> otherwise. */ public boolean forEachPair(final IntIntProcedure procedure) { for (int i = table.length ; i-- > 0 ;) { if (state[i]==FULL) if (! procedure.apply(table[i],values[i])) return false; } return true; } /**
/** * Applies a procedure to each (key,value) pair of the receiver, if any. * Iteration order is guaranteed to be <i>identical</i> to the order used by method {@link #forEachKey(IntProcedure)}. * * @param procedure the procedure to be applied. Stops iteration if the procedure returns <tt>false</tt>, otherwise continues. * @return <tt>false</tt> if the procedure stopped before all keys where iterated over, <tt>true</tt> otherwise. */ public boolean forEachPair(final IntIntProcedure procedure) { for (int i = table.length ; i-- > 0 ;) { if (state[i]==FULL) if (! procedure.apply(table[i],values[i])) return false; } return true; } /**
/** * Applies a procedure to each (key,value) pair of the receiver, if any. * Iteration order is guaranteed to be <i>identical</i> to the order used by * method {@link #forEachKey(IntProcedure)}. * * @param procedure * the procedure to be applied. Stops iteration if the procedure * returns <tt>false</tt>, otherwise continues. * @return <tt>false</tt> if the procedure stopped before all keys where * iterated over, <tt>true</tt> otherwise. */ public boolean forEachPair(final IntIntProcedure procedure) { for (int i = table.length; i-- > 0;) { if (state[i] == FULL) if (!procedure.apply(table[i], values[i])) return false; } return true; }
public boolean apply(int key) { return procedure.apply(key,get(key)); } }
public boolean apply(int key) { return procedure.apply(key, get(key)); } });
public boolean apply(int key) { return procedure.apply(key,get(key)); } }
public boolean apply(int key, int value) { if (condition.apply(key,value)) { keyList.add(key); valueList.add(value); } return true; } }
public boolean apply(int key, int value) { if (condition.apply(key,value)) { keyList.add(key); valueList.add(value); } return true; } }
public boolean apply(int key, int value) { if (condition.apply(key, value)) { keyList.add(key); valueList.add(value); } return true; } });
long mask = val & (1L << j); if ((state && (mask!=0L)) || ((!state) && (mask==0L))) { if (!procedure.apply(column,row)) return false; for (int j=bitsPerUnit; --j >= 0; ) { if (((val & (1L << j))) != 0L) { if (!procedure.apply(column,row)) return false; for (int j=bitsPerUnit; --j >= 0; ) { if (((val & (1L << j))) == 0L) { if (!procedure.apply(column,row)) return false;
long mask = val & (1L << j); if ((state && (mask!=0L)) || ((!state) && (mask==0L))) { if (!procedure.apply(column,row)) return false; for (int j=bitsPerUnit; --j >= 0; ) { if (((val & (1L << j))) != 0L) { if (!procedure.apply(column,row)) return false; for (int j=bitsPerUnit; --j >= 0; ) { if (((val & (1L << j))) == 0L) { if (!procedure.apply(column,row)) return false;
if (state[i]==FULL && condition.apply(table[i],values[i])) { keyList.add(table[i]); valueList.add(values[i]);
if (state[i]==FULL && condition.apply(table[i],values[i])) { keyList.add(table[i]); valueList.add(values[i]);
if (state[i] == FULL && condition.apply(table[i], values[i])) { keyList.add(table[i]); valueList.add(values[i]);