Boolean wraps the primitive boolean type and provides Boolean.TRUE and Boolean.FALSE. Using null to represent a third state turns a simple two-value choice into an ambiguous three-value API. section 5.1.1
The nullable Boolean trap
A dialog might return true for Yes, false for No, and null for Cancel. Code such as if (shouldMoveToWishList()) can mishandle that third outcome, especially when unboxing occurs. Replace the nullable Boolean with named enum values such as YES, NO, and CANCEL, or model the operation directly with REMOVE_FROM_BASKET, MOVE_TO_WISH_LIST, and CANCEL.
