/** * Compresses the graph if there is a large number of deleted entries and returns the translated * new next index. */ private int maybeCompress(int nextIndex) { if (entries.length != INITIAL_CAPACITY << 1 && deletedEntries >= (totalEntries >> 1) + (totalEntries >> 2)) { return compressLarge(nextIndex); } return nextIndex; }
/** * Compresses the graph if there is a large number of deleted entries and returns the translated * new next index. */ private int maybeCompress(int nextIndex) { if (entries.length != INITIAL_CAPACITY << 1 && deletedEntries >= (totalEntries >> 1) + (totalEntries >> 2)) { return compressLarge(nextIndex); } return nextIndex; }