int (int key) { if (key == Int2IntMultimap.NO_VALUE) { //Int2IntMultimap doesn't allow 0 keys/values, hence replace 0 key with just any value!=0. Key doesn't // identify value uniquely anyway, hence this replacement just adds another collision -- basically, // we replaced original Key.hash with our own hash, which avoids 0 at the cost of slightly higher collision // chances return -1;// any value!=0 will do } return key; }