boolean is represented using its wrapper type, Boolean. There are (at least) two ways for this:
The first casts to the wrapper type, then uses the booleanValue() method to get its matching primitive value. Note that since
Java 5.0, because of auto-boxing, you don't even need to call booleanValue().
The second compares the result with Boolean.FALSE, a static instance of the wrapper type that represents false. equals only returns true if the passed object is also a Boolean with the same value.