We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
As an option to the builder, one could imagine something like:
builder(Person.class).requireAllFields().....
A corresponding check in the builder (or constructor), could throw if not all fields are set during building time.
Or, if we allow nulls, we could at least prevent throwing because of the cast to primitives (which never can be null):
builder(Person.class).primitiveDefaults().... // would e.g. return 0 for int, 0.0 for double,
One could even have more advanced default values something like:
builder(Person.class).defaultsWherePossible().... // would e.g. return (additionally to above) "" for string, empty lists for lists ... etc
Also something like
builder(Person.class).defaults(Function<Class<T>, T> defaultFactory)....
could be imagined ...
All to be implemented as soon as we need it ;-)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
As an option to the builder, one could imagine something like:
A corresponding check in the builder (or constructor), could throw if not all fields are set during building time.
Or, if we allow nulls, we could at least prevent throwing because of the cast to primitives (which never can be null):
One could even have more advanced default values something like:
Also something like
could be imagined ...
All to be implemented as soon as we need it ;-)
The text was updated successfully, but these errors were encountered: