code: public static Integer toIntegerObject(final Boolean bool) {
          if (bool == null) {
              return null;
          }
          return bool.booleanValue() ? NumberUtils.INTEGER_ONE : NumberUtils.INTEGER_ZERO;
      }
docs: <p>Converts a Boolean to a Integer using the convention that
  {@code zero} is {@code false}.</p>
  
  <p>{@code null} will be converted to {@code null}.</p>
  
  <pre>
  BooleanUtils.toIntegerObject(Boolean.TRUE)  = Integer.valueOf(1)
  BooleanUtils.toIntegerObject(Boolean.FALSE) = Integer.valueOf(0)
  </pre>
  
  @param bool  the Boolean to convert
  @return one if Boolean.TRUE, zero if Boolean.FALSE, {@code null} if {@code null}