daily pastebin goal
65%
SHARE
TWEET

Untitled

a guest Jan 23rd, 2018 39 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public static boolean convertToBoolean(Object value) {
  2.     boolean returnValue = false;
  3.     if (value == null) {
  4.         return false;
  5.     }
  6.     if (value instanceof Boolean) {
  7.         return (boolean) value;
  8.     }
  9.     String objvalue = (String) value;
  10.     for(int i = 0; i < TrueArray.length; i++) {
  11.         if(objvalue.equalsIgnoreCase(TrueArray[i])) {
  12.             returnValue = true;
  13.             break;
  14.         }
  15.     }
  16.     return returnValue;
  17. }
RAW Paste Data
Top