XValueChildrenList (@NotNull final XValueChildrenList values) { if (values.size() > 0 && isLargeCollection()) { if (myOffset + Math.min(MAX_ITEMS_TO_HANDLE, values.size()) < myCollectionLength) { XValueChildrenList newValues = new XValueChildrenList(); for (int i = 0; i < values.size() - 1; i++) { newValues.add(values.getName(i), values.getValue(i)); } return newValues; } } return values; }