摘要:
由于在Android 7.0 采用了StrictMode API政策禁,其中有一条限制就是对目录访问的限制。 这项变更意味着我们无法通过File API访问手机存储上的数据,也就是说,给其他应用传递 file:// URI 类型的Uri,可能会导致接受者无法访问该路径,并且会会触发 FileUriE 阅读全文
posted @ 2020-05-08 13:21
张学涛
阅读(794)
评论(0)
推荐(0)
摘要:
List<Student> testList = new ArrayList<Student>(); List<Student> repeatList = new ArrayList<Student>();//用于存放重复的元素的list Map<String, Integer> map = new 阅读全文
posted @ 2020-05-08 10:52
张学涛
阅读(9174)
评论(0)
推荐(1)
摘要:
Stream 中文称为 “流”,通过将集合转换为这么一种叫做 “流” 的元素序列,通过声明性方式,能够对集合中的每个元素进行一系列并行或串行的流水线操作。 函数式编程带来的好处尤为明显。这种代码更多地表达了业务逻辑的意图,而不是它的实现机制。易读的代码也易于维护、更可靠、更不容易出错。 面对一对多结 阅读全文
posted @ 2020-05-08 10:36
张学涛
阅读(351)
评论(0)
推荐(0)
摘要:
List<User> userList=userList.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(User :: ge 阅读全文
posted @ 2020-05-08 10:22
张学涛
阅读(3609)
评论(0)
推荐(0)
摘要:
switch (receive.getConditionWhere()) { case "0": break; case "1": //新品优先 Collections.sort(likeFloorGoods, new Comparator<ReturnGoodsStockBean>(){ @Ove 阅读全文
posted @ 2020-05-08 10:18
张学涛
阅读(2706)
评论(0)
推荐(0)
摘要:
list.stream().mapToDouble(User::getAge).sum()//和 list.stream().mapToDouble(User::getAge).max()//最大 list.stream().mapToDouble(User::getAge).min()//最小 l 阅读全文
posted @ 2020-05-08 10:16
张学涛
阅读(5459)
评论(0)
推荐(1)

浙公网安备 33010602011771号