Java Boolean From toBool(String val)

Here you can find the source of toBool(String val)

Description

to Bool

License

Open Source License

Declaration

public static boolean toBool(String val) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static boolean toBool(String val) {
        val = val.toLowerCase();
        return (val.equals("1") || val.equals("on") || val.equals("yes"));
    }/* w  w w  .  jav a  2 s.c o  m*/
}

Related

  1. toBool(String bStr)
  2. toBool(String bv)
  3. toBool(String str)
  4. toBool(String str)
  5. toBool(String v, boolean def)
  6. toBool(String val, boolean def)
  7. toBoolean(boolean b)
  8. toBoolean(Boolean bool)
  9. toBoolean(Boolean bool)