public static Boolean toBooleanObject(final int value, final int trueValue, final int falseValue, final int nullValue) {
        if (value == trueValue) {
            return Boolean.TRUE;
        }
        if (value == falseValue) {
            return Boolean.FALSE;
        }
        if (value == nullValue) {
            return null;
        }
        // no match
        throw new IllegalArgumentException("The Integer did not match any specified value");
    }
public static Boolean toBooleanObject ( final int value , final int trueValue , final int falseValue , final int nullValue ) { if ( value == trueValue ) { return Boolean . TRUE ; } if ( value == falseValue ) { return Boolean . FALSE ; } if ( value == nullValue ) { return null ; } throw new IllegalArgumentException ( "The Integer did not match any specified value" ) ; }
<p>Converts an int to a Boolean specifying the conversion values.</p>

<p>NOTE: This returns null and will throw a NullPointerException if unboxed to a boolean. </p>

<pre>
BooleanUtils.toBooleanObject(0, 0, 2, 3) = Boolean.TRUE
BooleanUtils.toBooleanObject(2, 1, 2, 3) = Boolean.FALSE
BooleanUtils.toBooleanObject(3, 1, 2, 3) = null
</pre>

@param value  the Integer to convert
@param trueValue  the value to match for {@code true}
@param falseValue  the value to match for {@code false}
@param nullValue  the value to to match for {@code null}
@return Boolean.TRUE, Boolean.FALSE, or {@code null}
@throws IllegalArgumentException if no match