Revision (@Nullable Date date, @Nullable Long change, @NotNull Revision defaultValue) { Revision result; if (date != null) { result = Revision.of(date); } else if (change != null) { result = Revision.of(change.longValue()); } else { result = defaultValue; } return result; }