/** * Construct a new indexer. It maps each long key to its position in the list, and then be ready for more keys. * * @param keys The list of keys to store. */ public static HashKeyIndex create(LongList keys) { HashKeyIndex idx = create(); LongIterator iter = keys.iterator(); while (iter.hasNext()) { idx.internId(iter.nextLong()); } return idx; }
/** * Construct a new indexer. It maps each long key to its position in the list, and then be ready for more keys. * * @param keys The list of keys to store. */ public static HashKeyIndex create(LongList keys) { HashKeyIndex idx = create(); LongIterator iter = keys.iterator(); while (iter.hasNext()) { idx.internId(iter.nextLong()); } return idx; }