[ 
https://issues.apache.org/jira/browse/WICKET-6396?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16048938#comment-16048938
 ] 

Kamil commented on WICKET-6396:
-------------------------------

Lambda helpers were methods that abused Wicket's way of creating components and 
I agree that they should be removed. 
But these "Optional" methods are different. Of course we don't need Optionals 
in Java - we could use null checks all over the place, but there is a reason 
why they were created... You are moving with Wicket to Java8 world and I think 
you should move forward here too. Of course theese methods not necessary (just 
like Optionals in Java), but they're very convenient.

> Model should provide other Optional's methods
> ---------------------------------------------
>
>                 Key: WICKET-6396
>                 URL: https://issues.apache.org/jira/browse/WICKET-6396
>             Project: Wicket
>          Issue Type: Improvement
>    Affects Versions: 8.0.0-M6
>            Reporter: Kamil
>            Priority: Minor
>
> Model should provide
> {code}
> public <X extends Throwable> T orElseThrow(Supplier<? extends X> 
> exceptionSupplier) throws X;
> {code}
> {code}
> public boolean isPresent();
> {code}
> {code}
> public void ifPresent(Consumer<? super T> consumer);
> {code}
> methods for the sake of consistency with Optional API



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to