Created
February 7, 2017 11:08
-
-
Save devkhan/d82c955e7930162c1f9cf455a7685478 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FUtility { | |
public FUtility() {} | |
public static boolean isEmpty(Object object) { | |
return object == null ? true : false; | |
} | |
public static boolean isNotEmpty(Object object) { | |
return object == null ? false : true; | |
} | |
public static boolean isEmpty(String str) { | |
return str == null || (str != null && "".equals(str)) ? true : false; | |
} | |
public static boolean isNotEmpty(String str) { | |
return str == null || (str != null && "".equals(str)) ? false : true; | |
} | |
public static String getModifiedString(Object obj) { | |
return isEmpty(obj) ? "" : ("null".equalsIgnoreCase((String) obj) ? "" : (String) obj); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment