DataUtil { public static boolean toBoolean(String value, boolean defValue) { return TRUE_SET.contains(value) || !FALSE_SET.contains(value) && defValue; }  static boolean getBoolean(Object value, boolean defValue); static Boolean doGetBoolean(Object value, Boolean defValue); static boolean toBoolean(String value, boolean defValue); static Boolean convertToBoolean(String value, Boolean defValue); static boolean toBoolean(String value); static int getInt(Object value, int defValue); static long getLong(Object value, long defValue); static double getDouble(Object value, double defValue); static String getString(Object value, String defValue); static String[] getStringArray(Object object, String[] defValue); static int[] getIntArray(Object object, int[] defValue); static List<String> getStringList(Object object);  }
@Test public void toBoolean() throws Exception { assertEquals(DataUtil.toBoolean("toBoolean"), false); assertEquals(DataUtil.toBoolean("t"), true); }