int (int shortIndex) { checkShortIndex(shortIndex); int strongIndex = shortIndex / myBlockSize; int sub = shortIndex - strongIndex * myBlockSize; for (int longIndex = myStrongShortIndexes[strongIndex]; longIndex < myLongSize; longIndex++) { if (myVisibleIndexes.get(longIndex)) sub--; if (sub == -1) return longIndex; } throw new IllegalStateException( "Not found long index for short index: " + shortIndex + ". Long & short size is: " + myLongSize + ", " + myShortSize + "."); }