public final class IntMapUtils extends Object
IntIntHashMaps.| Modifier and Type | Method and Description |
|---|---|
static com.carrotsearch.hppc.IntIntHashMap |
addAllFromFlattened(com.carrotsearch.hppc.IntIntHashMap map,
int[] flattened)
Adds all entries from a flat [] array to the provided map.
|
static int[] |
flatten(com.carrotsearch.hppc.IntIntHashMap map)
Converts an
IntIntHashMap into a flat int [] array. |
static int[] |
flattenSortedByKey(com.carrotsearch.hppc.IntIntHashMap map)
Converts an
IntIntHashMap into a flat int [] array. |
public static final int[] flattenSortedByKey(com.carrotsearch.hppc.IntIntHashMap map)
IntIntHashMap into a flat int [] array. The
returned arrays contains [key,value] pairs and is sorted in ascending order
by key values.public static final int[] flatten(com.carrotsearch.hppc.IntIntHashMap map)
IntIntHashMap into a flat int [] array. Even indexes
in the flat array represent keys and the corresponding odd indexes --
values. Note: the order of keys in the flat array is arbitrary.public static final com.carrotsearch.hppc.IntIntHashMap addAllFromFlattened(com.carrotsearch.hppc.IntIntHashMap map,
int[] flattened)
map for convenience