Skip to content

Commit 5562106

Browse files
committed
Merge branch 'develop'
# Conflicts: # fj-core/src/main/java/org/fugerit/java/core/lang/compare/CheckEmptyHelper.java
2 parents f96bd54 + 42f18ef commit 5562106

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

fj-core/src/main/java/org/fugerit/java/core/lang/compare/CheckEmpty.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
public 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
}

fj-core/src/main/java/org/fugerit/java/core/lang/compare/CheckEmptyHelper.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@
44

55
public 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 ) {

0 commit comments

Comments
 (0)