MCPcopy Create free account
hub / github.com/Bit0r/java-util / check

Method check

src/main/java/util/CommonUtils.java:341–357  ·  view source on GitHub ↗

如果返回null则表示没有错误 通过实体中注解 必填校验 @param objectList @return

(List objectList)

Source from the content-addressed store, hash-verified

339 * @return
340 */
341 public static String check(List objectList) {
342 if (null == objectList || objectList.size() < 1) {
343 return "参数为空";
344 }
345 StringBuilder sb = new StringBuilder();
346 for (int i = 0; i < objectList.size(); i++) {
347 Object date = objectList.get(i);
348 String res = check(date);
349 if (res != null) {
350 sb.append("第" + i + "列数据:").append(res).append(".");
351 }
352 }
353 if (sb.length() > 0 && !"null".equals(sb.toString()) && !"".equals(sb.toString())) {
354 return sb.toString();
355 }
356 return null;
357 }
358
359 /**
360 * 如果返回null则表示没有错误

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected