public static int toInteger(Boolean bool, int trueValue, int falseValue, int nullValue) { if (bool == null) { return nullValue; } return (bool.booleanValue() ? trueValue : falseValue);
public static int toInteger(boolean bool) { return (bool ? 1 : 0);
    public static int toInteger(Boolean bool, int trueValue, int falseValue, int nullValue) {        if (bool == null) {            return nullValue;        }        return (bool.booleanValue() ? trueValue : falseValue);    }