File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
common-tools/clas-utils/src/main/java/org/jlab/utils/groups Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -326,11 +326,23 @@ public int getIndex(long hashcode, int order) {
326326 return (int ) ((hashcode >> this .byteShifts [order ]) & mask );
327327 }
328328
329+ /**
330+ * Retrieves an array of the requested indices.
331+ *
332+ * @param indices
333+ * @return
334+ */
335+ public int [] getIndices (long hashcode , int ... indices ) {
336+ int [] ret = new int [indices .length ];
337+ for (int i =0 ; i <ret .length ; i ++)
338+ ret [i ] = getIndex (hashcode , i );
339+ return ret ;
340+ }
341+
329342 /**
330343 * Returns a formatted string representing all indices in the hash key.
331344 *
332345 * @param hashcode the encoded long key
333- * @param length the number of indices to extract
334346 * @return a string representation of the indices
335347 */
336348 public String getString (long hashcode ) {
You can’t perform that action at this time.
0 commit comments