@Test public void isBooleanInputNotNullOutputTrue() { final String value = "1"; final boolean actual = BooleanUtil.isBoolean(value); Assert.assertTrue(actual); }
public static boolean isBoolean(String value) { return "false".equalsIgnoreCase(value) || "off".equalsIgnoreCase(value) || "0".equalsIgnoreCase(value) || "true".equalsIgnoreCase(value) || "on".equalsIgnoreCase(value) || "1".equalsIgnoreCase(value); }
BooleanUtil { public static boolean isBoolean(String value) { return "false".equalsIgnoreCase(value) || "off".equalsIgnoreCase(value) || "0".equalsIgnoreCase(value) || "true".equalsIgnoreCase(value) || "on".equalsIgnoreCase(value) || "1".equalsIgnoreCase(value); } }
BooleanUtil { public static boolean isBoolean(String value) { return "false".equalsIgnoreCase(value) || "off".equalsIgnoreCase(value) || "0".equalsIgnoreCase(value) || "true".equalsIgnoreCase(value) || "on".equalsIgnoreCase(value) || "1".equalsIgnoreCase(value); } private  BooleanUtil(); }
BooleanUtil { public static boolean isBoolean(String value) { return "false".equalsIgnoreCase(value) || "off".equalsIgnoreCase(value) || "0".equalsIgnoreCase(value) || "true".equalsIgnoreCase(value) || "on".equalsIgnoreCase(value) || "1".equalsIgnoreCase(value); } private  BooleanUtil(); static boolean isBoolean(String value); static int toInteger(boolean b); }
BooleanUtil { public static boolean isBoolean(String value) { return "false".equalsIgnoreCase(value) || "off".equalsIgnoreCase(value) || "0".equalsIgnoreCase(value) || "true".equalsIgnoreCase(value) || "on".equalsIgnoreCase(value) || "1".equalsIgnoreCase(value); } private  BooleanUtil(); static boolean isBoolean(String value); static int toInteger(boolean b);  }