File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
fj-core/src/main/java/org/fugerit/java/core/lang/compare Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change 22
33public interface CheckEmpty {
44
5+ /**
6+ * Check if the item is logically empty
7+ *
8+ * @return true if the item is empty
9+ */
510 boolean isEmpty ();
611
712}
Original file line number Diff line number Diff line change 44
55public class CheckEmptyHelper {
66
7+ /**
8+ * Check if a object is empty.
9+ *
10+ * If the object is null then is empty
11+ * If the object is a string then even empty string is
12+ * If the object implements CheckEmpty interface that method is checked
13+ *
14+ * @param v the item to be checked
15+ * @return true if the item is null or logically empty
16+ */
717 public static boolean isEmpty ( Object v ) {
818 boolean empty = ( v == null );
919 if ( !empty ) {
You can’t perform that action at this time.
0 commit comments