Here you can find the source of negate(final Boolean bool)
Parameter | Description |
---|---|
bool | a parameter |
public static Boolean negate(final Boolean bool)
//package com.java2s; //License from project: Open Source License public class Main { /**//from w w w . jav a2s . c o m * Method to negate a Boolean * * @param bool * @return {@link Boolean} */ public static Boolean negate(final Boolean bool) { if (bool == null) { return null; } return bool.booleanValue() ? Boolean.FALSE : Boolean.TRUE; } }