| Code with Finding: |
class BooleanUtils {
/**
* <p>Converts a Boolean to a String returning <code>'true'</code>,
* <code>'false'</code>, or <code>null</code>.</p>
*
* <pre>
* BooleanUtils.toStringTrueFalse(Boolean.TRUE) = "true"
* BooleanUtils.toStringTrueFalse(Boolean.FALSE) = "false"
* BooleanUtils.toStringTrueFalse(null) = null;
* </pre>
*
* @param bool the Boolean to check
* @return <code>'true'</code>, <code>'false'</code>,
* or <code>null</code>
*/
public static String toStringTrueFalse(Boolean bool) {
return toString(bool, "true", "false", null);
}
}
|