Java Char to Boolean char2Boolean(char c)

Here you can find the source of char2Boolean(char c)

Description

char Boolean

License

Apache License

Declaration

public static Boolean char2Boolean(char c) 

Method Source Code

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

public class Main {
    public static Boolean char2Boolean(char c) {
        if (c == '1' || c == 't' || c == 'T') {
            return true;
        } else if (c == '0' || c == 'f' || c == 'F') {
            return false;
        } else {/*from   ww  w.ja  v a  2s . co  m*/
            return null;
        }
    }
}