December 25, 2018

Creating a boolean switch using BooleanSupplier, which alternatively returns true and false.

In this article, we will create a BooleanSupplier implementation, which returns true or false value on the alternate basis. If it returns true on current call, then it will return a false on the next call and a true on the next to next call, and this will go on. This is a very simple […]

Read more
December 25, 2018

Providing implementation for getAsBoolean in BooleanSupplier – a functional interface – in java

If you don’t know about Functional Inteface then you can read about it, in the provided link. Now coming to¬†BooleanSupplier, it is a functional interface. It has only one abstract method. boolean getAsBoolean() :-¬†it returns a boolean value and has no input parameters. It can be used to provide streams of boolean values. Implementation 1 […]

Read more