Skip to content

Instantly share code, notes, and snippets.

@abhinav272
Created December 27, 2017 15:16
Show Gist options
  • Save abhinav272/82b6f8c9b4d2d175f46ced3874a280b1 to your computer and use it in GitHub Desktop.
Save abhinav272/82b6f8c9b4d2d175f46ced3874a280b1 to your computer and use it in GitHub Desktop.
Util for Objects
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