/** * Fills all keys contained in the receiver into the specified list. * Fills the list, starting at index 0. * After this call returns the specified list has a new size that equals <tt>this.size()</tt>. * Iteration order is guaranteed to be <i>identical</i> to the order used by method {@link #forEachKey(LongProcedure)}. * <p> * This method can be used to iterate over the keys of the receiver. * * @param list the list to be filled, can have any size. */ public void keys(LongArrayList list) { list.setSize(distinct); long[] elements = list.elements(); long[] tab = table; byte[] stat = state; int j=0; for (int i = tab.length ; i-- > 0 ;) { if (stat[i]==FULL) elements[j++]=tab[i]; } } /**
/** * Fills all keys contained in the receiver into the specified list. * Fills the list, starting at index 0. * After this call returns the specified list has a new size that equals <tt>this.size()</tt>. * Iteration order is guaranteed to be <i>identical</i> to the order used by method {@link #forEachKey(LongProcedure)}. * <p> * This method can be used to iterate over the keys of the receiver. * * @param list the list to be filled, can have any size. */ public void keys(LongArrayList list) { list.setSize(distinct); long[] elements = list.elements(); long[] tab = table; byte[] stat = state; int j=0; for (int i = tab.length ; i-- > 0 ;) { if (stat[i]==FULL) elements[j++]=tab[i]; } } /**
/** * Fills all keys contained in the receiver into the specified list. Fills * the list, starting at index 0. After this call returns the specified list * has a new size that equals <tt>this.size()</tt>. Iteration order is * guaranteed to be <i>identical</i> to the order used by method * {@link #forEachKey(LongProcedure)}. * <p> * This method can be used to iterate over the keys of the receiver. * * @param list * the list to be filled, can have any size. */ public void keys(LongArrayList list) { list.setSize(distinct); long[] elements = list.elements(); long[] tab = table; byte[] stat = state; int j = 0; for (int i = tab.length; i-- > 0;) { if (stat[i] == FULL) elements[j++] = tab[i]; } }
setSize(j); return modified;
setSize(j); return modified;
setSize(j); return modified;
setSize(j); return modified;
setSize(j); return modified;
setSize(j); return modified;