Skip to content

Simplification revised#4

Merged
tpietzsch merged 6 commits into
masterfrom
simplification-revised
Jun 11, 2020
Merged

Simplification revised#4
tpietzsch merged 6 commits into
masterfrom
simplification-revised

Conversation

@tpietzsch
Copy link
Copy Markdown
Member

Incorporate some ideas from #2

…mer)

This allows to define AbstractValues.toString() which will do by default
just printing of all modified (non-default) values, and allows subclasses
to override forEach() to include defaults which will be potentially useful
for other purposes as well.
Meaning, that ValuesToString is now just one possible BiConsumer.
This reduces boilerplate because derived classes don't have to define a
constructor for the AbstractValues subclass.
Rename AbstractOptions.add() to setValue().
Rename AbstractValues.value() to getValueOrDefault().
Also add org.scijava.optional.examples.Playground that has the full
implementation of the example given in the README and package javadoc.
@tpietzsch tpietzsch mentioned this pull request Jun 11, 2020
@tpietzsch tpietzsch merged commit 0119435 into master Jun 11, 2020
@tpietzsch tpietzsch deleted the simplification-revised branch June 11, 2020 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant