'How to Convert java.lang.Boolean to scala.Boolean?

How can a java.lang.Boolean be converted to a scala.Boolean?

There is a similar question which is specific to Spring and Swagger. My question is more generic and applicable in any circumstances.

Thank you in advance for your consideration and response.



Solution 1:[1]

The Boolean.unbox method will convert to scala Boolean.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Ramón J Romero y Vigil