Created
December 27, 2017 15:16
-
-
Save abhinav272/82b6f8c9b4d2d175f46ced3874a280b1 to your computer and use it in GitHub Desktop.
Util for Objects
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
import java.util.List; | |
public class ObjectUtil { | |
public static boolean isEmpty(String string) { | |
return string == null || string.length() == 0; | |
} | |
public static boolean isNull(Object obj) { | |
return obj == null; | |
} | |
public static boolean isEmptyList(List list) { | |
return list == null || list.isEmpty(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment