boolean (@NotNull VirtualFile file) { if (frozen) { throw new UnsupportedOperationException(); } boolean added; if (file instanceof VirtualFileWithId) { int id = ((VirtualFileWithId)file).getId(); BitSet ids = fileIds; IntSet idSet = this.idSet; if (ids != null) { added = !ids.get(id); ids.set(id); } else if (idSet != null) { added = idSet.add(id); if (idSet.size() > BIT_SET_LIMIT) { convertToBitSet(); } } else { added = weirdFiles.add(file); if (weirdFiles.size() > INT_SET_LIMIT) { convertToIntSet(); } } } else { added = weirdFiles.add(file); } return added; }