Java Boolean Value From convertBooleanValueToInt(String value)

Here you can find the source of convertBooleanValueToInt(String value)

Description

convert Boolean Value To Int

License

Apache License

Parameter

Parameter Description
value BooleanString

Return

Integer 1 || 0

Declaration

public static int convertBooleanValueToInt(String value) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    /**/*from w w  w.j  a v a  2s  .co m*/
     * 
     * @param value BooleanString
     * @return Integer 1 || 0
     */
    public static int convertBooleanValueToInt(String value) {
        int val = 0;
        if (value.equals("true")) {
            val = 1;
        } else {
            val = 0;
        }
        return val;
    }
}

Related

  1. convertBoolean(String str, boolean defaults)
  2. convertBoolean(String value)
  3. convertBoolean(String value)
  4. convertBoolean2boolean(final Boolean[] pArray)
  5. convertBooleanFromBytes(byte[] byteArray)