*public class *Args
{
    *public static *<T> T notNull(T argument, Supplier<String> name) {
        *if*(argument == *null*) {
            *throw new *IllegalArgumentException(name.get() + *" may not be
null"*);
        } *else *{
            *return *argument;
        }
    }

    *public void *test() {
        Args.*notNull*(*this*, ()-> *"this"*);
    }
}

On Fri, Nov 25, 2016 at 12:25 PM, Martin Grigorov <[email protected]>
wrote:

> How the new usage would look like ?
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Fri, Nov 25, 2016 at 12:08 PM, Ernesto Reinaldo Barreiro <
> [email protected]> wrote:
>
> > Hi,
> >
> > Does it make sense to use lambdas for things like
> >
> > https://github.com/apache/wicket/blob/master/wicket-
> > util/src/main/java/org/apache/wicket/util/lang/Args.java#L37
> >
> > ?
> >
> > --
> > Regards - Ernesto Reinaldo Barreiro
> >
>



-- 
Regards - Ernesto Reinaldo Barreiro

Reply via email to