List<Difference> (@Nullable Entry left, @Nullable Entry right, boolean isRightContentCurrent) { List<Difference> result = new SmartList<>(); if (left != null && right != null) { left.collectDifferencesWith(right, result, isRightContentCurrent); } else if (right != null) { right.collectCreatedDifferences(result, isRightContentCurrent); } else if (left != null) { left.collectDeletedDifferences(result, isRightContentCurrent); } return result; }