/** * Iterate over the entries of the map * * @param consumer to apply to each entry in the map */ public void forEach(final EntryConsumer<V> consumer) { for (Map.Entry<Long, V> entry : map.entrySet()) { Long compoundKey = entry.getKey(); final int keyPartA = (int) (compoundKey >>> 32); final int keyPartB = (int) (compoundKey & 0xFFFFFFFFL); consumer.accept(keyPartA, keyPartB, entry.getValue()); } }
/** * Iterate over the values in the map * * @param consumer to apply to each value in the map */ public void forEach(final Consumer<V> consumer) { for (Map.Entry<Long, V> entry : map.entrySet()) { consumer.accept(entry.getValue()); } }