adt4j
adt4j copied to clipboard
Implement polymorphic updates
This should work...
Optional<Integer> i = flag ? Optional.present(5) : Optional.missing();
Optional<String> m = i.withValue("5"); // Generated updater method