public static Integer booleanToInteger ( Boolean value ) { return value . booleanValue ( ) ? Integer . valueOf ( 1 ) : Integer . valueOf ( 0 ) ; }
Converts Boolean to Integer . If boolean value is TRUE then return 1 else return 0 .