摘要:
List<Map<String, Object>> 去出重复 public static void main(String[] args) { String [] array= {"name","age"}; List<Map<String, Object>> oldList = getTestDa 阅读全文
摘要:
/** * request转字符串 * @param request * @param charset 编码格式 (UTF-8) * @return * @see [类、类#方法、类#成员] */ public static String parseRequst(HttpServletRequest 阅读全文
摘要:
1.集合中获取指定的一个属性值 List<String> items = li.stream().map(ScdCostChargeItemEntity::getItem).collect(Collectors.toList()); 2.集合分组 Map<String, List<T>> yearD 阅读全文
摘要:
public class MenuTree1 { /** * 构建结束的树 */ private static List<Menu> menuList ; /** * 构建树 * @param menuId 树的根节点id 0:代表顶级节点 * @param nodeList 要构建的数据 * @r 阅读全文
摘要:
@Test public void test10(){ //根据device_code去重,取出重复值 List<Employee> emps =new ArrayList<>(); List<String> dupList = emps.stream().collect(Collectors.gr 阅读全文
摘要:
方式一: List<String> listTemp = new ArrayList<String>(); for(int i=0;i<list.size();i++){ if(!listTemp.contains(list.get(i))){ listTemp.add(list.get(i)); 阅读全文
摘要:
@Test public void test12(){ // 需要过滤的集合 List<Employee> first = Arrays.asList( new Employee(102, "李四", 79, 6666.66, Status.BUSY), new Employee(101, "张三" 阅读全文