|
@@ -1,6 +1,5 @@
|
|
package com.fjhx.utils;
|
|
package com.fjhx.utils;
|
|
|
|
|
|
-import io.swagger.models.auth.In;
|
|
|
|
import org.springblade.core.tool.utils.StringUtil;
|
|
import org.springblade.core.tool.utils.StringUtil;
|
|
|
|
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
@@ -13,22 +12,22 @@ import java.util.Map;
|
|
*/
|
|
*/
|
|
public class ListUtil {
|
|
public class ListUtil {
|
|
|
|
|
|
- public static Map<String, Integer> duplicateCheckingCount(List<String> list){
|
|
|
|
- Map<String,Integer> map = new HashMap<>();
|
|
|
|
|
|
+ public static Map<String, Integer> duplicateCheckingCount(List<String> list) {
|
|
|
|
+ Map<String, Integer> map = new HashMap<>();
|
|
for (String string : list) {
|
|
for (String string : list) {
|
|
- if(map.containsKey(string)) {
|
|
|
|
- map.put(string, map.get(string).intValue()+1);
|
|
|
|
- }else {
|
|
|
|
|
|
+ if (map.containsKey(string)) {
|
|
|
|
+ map.put(string, map.get(string).intValue() + 1);
|
|
|
|
+ } else {
|
|
map.put(string, new Integer(1));
|
|
map.put(string, new Integer(1));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return map;
|
|
return map;
|
|
}
|
|
}
|
|
|
|
|
|
- public static Boolean checkList(List<String> list,String eq){
|
|
|
|
- for(String i:list){
|
|
|
|
- if(!StringUtil.equals(i,eq)){
|
|
|
|
- return false;
|
|
|
|
|
|
+ public static Boolean checkList(List<String> list, String eq) {
|
|
|
|
+ for (String i : list) {
|
|
|
|
+ if (!StringUtil.equals(i, eq)) {
|
|
|
|
+ return false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return true;
|
|
return true;
|