Here you can find the source of negate(Boolean bool)
public static Boolean negate(Boolean bool)
//package com.java2s; //License from project: Mozilla Public License public class Main { public static Boolean negate(Boolean bool) { if (bool == null) { return null; }/* w ww.j ava2 s .co m*/ return (bool ? Boolean.FALSE : Boolean.TRUE); } }