Use hollow summary values sorting system, background + jsp

First, the background:

. 1. entity.getStringValue () isEmpty () ; // string carrying method, a method was found not empty
implementation principle: a length determination value

public boolean isEmpty() {
   return value.length == 0;
}

 

2.StringUtils.isEmpty(orderby)

The principle: == 0 is null or length

public static boolean isEmpty(final CharSequence cs) {
   return cs == null || cs.length() == 0;
}

 StringUtils.isNotEmpty(message)

The principle: not null, and a length> 0

    public static boolean isNotEmpty(final CharSequence cs) {
        return !StringUtils.isEmpty(cs);
    }

 3.entity.getParent().setParentIds(StringUtils.EMPTY);

StringUtils.EMPTY definition;

public static final String EMPTY = "";

 

4.StringUtils.isBlank(sessionId)

The principle: isBlank is a null (strings are space, tab, the tab case) determination on the basis isEmpty.

public static boolean isBlank(final CharSequence cs) {
        int strLen;
        if (cs == null || (strLen = cs.length()) == 0) {
            return true;
        }
        for (int i = 0; i < strLen; i++) {
            if (Character.isWhitespace(cs.charAt(i)) == false) {
                return false;
            }
        }
        return true;
    }
StringUtils.isNotBlank (vaccineName) 
The principle: It is on the basis of the isBlank
   public static boolean isNotBlank(final CharSequence cs) {
        return !StringUtils.isBlank(cs);
    }

 For example:
. StringUtils isEmpty ( "") = false

StringUtils.isBlank(" ") = true

5.bsManageProduct.getVaccineid() !=null && !"".equals(bsManageProduct.getVaccineid())

 

Second, the front end

1.jQuery in empty

<c:if test="${not empty user.id}">
<c:if test="${empty de.pinnum }">

 2.if(articleSelect != null && articleSelect.length > 0)



Guess you like

Origin www.cnblogs.com/banxian-yi/p/11582602.html