Here you can find the source of toBooleanDefaultIfNull(Boolean bool, boolean valueIfNull)
public static boolean toBooleanDefaultIfNull(Boolean bool, boolean valueIfNull)
//package com.java2s; //License from project: Mozilla Public License public class Main { public static boolean toBooleanDefaultIfNull(Boolean bool, boolean valueIfNull) { if (bool == null) { return valueIfNull; }/*from w w w . j a v a 2 s .c om*/ return bool; } }