当前位置: 首页 > news >正文

外贸网站 源码做的好详情页网站

外贸网站 源码,做的好详情页网站,高唐做网站建设的公司,wordpress 文档中心这里写自定义目录标题 一、什么是函数式接口二、自定义函数式接口三、作为参数传递 Lambda 表达式四、四大内置核心函数式接口1、消费形接口2、供给形接口3、函数型接口4、断言形接口 一、什么是函数式接口 只包含一个抽象方法的接口#xff0c;称为函数式接口。你可以通过 L… 这里写自定义目录标题 一、什么是函数式接口二、自定义函数式接口三、作为参数传递 Lambda 表达式四、四大内置核心函数式接口1、消费形接口2、供给形接口3、函数型接口4、断言形接口 一、什么是函数式接口 只包含一个抽象方法的接口称为函数式接口。你可以通过 Lambda 表达式来创建该接口的对象。我们可以在任意函数式接口上使用 FunctionalInterface 注解这样做可以检查它是否是一个函数式接口同时 javadoc 也会包含一条声明说明这个接口是一个函数式接口 二、自定义函数式接口 FunctionalInterface public interface MyFunction {public String getValue(String str); }FunctionalInterface public interface MyFuncT {public R getValue(T t); }三、作为参数传递 Lambda 表达式 FunctionalInterface public interface MyFuncT {public T getValue(T t); }public String toUpperString(MyFuncString mf, String str) {mf.getValue(str) }//Lambda 表达式作为参数传递 String str1 toUpperString(str - str.toUpperCase(),abcd); sout(str1 )四、四大内置核心函数式接口 1、消费形接口 //Consumer: 消费型接口Testpublic void test1(){happy(35,d - System.out.println(花费了d));}public void happy(double money, ConsumerDouble con){con.accept(money);}2、供给形接口 Testpublic void test2(){ListInteger numberList getNumberList(10, () - (int) (Math.random() * 100));for(Integer num : numberList){System.out.println(num);}}//需求产生一些整数并放在集合中public ListInteger getNumberList(int num, SupplierInteger sup){ListInteger list new ArrayList();for(int i 0; i num ; i){list.add(sup.get());}return list;}3、函数型接口 Testpublic void test3(){String result Strandler(\t\thello world,i like china!, str - str.trim());System.out.println(result);}//需求用于处理字符串public String Strandler(String str, FunctionString,String fun){return fun.apply(str);}4、断言形接口 Testpublic void test4(){ListString employees Arrays.asList(hello,houchen,shuchenxi);ListString list filterStr(employees, str - str.length() 3);for(String s : list){System.out.println(s);}}//需求将满足条件的字符串放入集合中public ListString filterStr(ListString list, PredicateString pre){ListString stringList new ArrayList();for(String str : list){if(pre.test(str)){stringList.add(str);}}return stringList;}
http://www.pierceye.com/news/264713/

相关文章:

  • 北京专业网站建设服务商枣庄建设工程管理局网站
  • 百度移动网站提交深圳做网站的好公司
  • 十大在线编程网站旅游营销型网站
  • 微转app是用网站做的吗win10运行wordpress
  • 微网站建设哪里便宜网站做的跟别人的一样可以吗
  • 合肥优化网站福州网站设计
  • 企业网站制作前期需要什么资料网站 月15g流量够用吗
  • 网络营销网站建设ppt环艺做网站
  • 手机建设银行官方网站网站开发要点
  • 做简历的网站有随州网站建设学校
  • 深圳建设网站企业青白江做网站的公司
  • dm网站制作软件无忧网站建设
  • 如何在自己的网站上做歌单王建设医生网站
  • 科技+杭州+网站建设做效果图的网站有哪些
  • 引流推广网站平台wordpress页面发布失败
  • 南京哪家网站建设好网站开发需要注意的
  • 一个综合网站上线多少钱wordpress粘贴word
  • 承接电商网站建设新手做自己的网站
  • 网页版视频网站建设需要多少钱四川鸿业建设集团公司网站
  • h5网站实例wordpress改造mip
  • 完整的网络营销推广方案包括优化营商环境心得体会个人
  • 商洛市住房和城乡建设局网站建免费网站
  • 做网站要多少的服务器网站设计的步骤
  • 网站关键词怎么做上首页wordpress 架构原理
  • 厦门专业网站建设代理国外在线crm系统suitecrm
  • 哪个网站可以领手工活在家做wordpress heroku
  • 为什么没有网站做图文小说电子商务网站开发的课程介绍
  • 在哪个网站做问卷好单页面网站推广
  • 专业网站建设模块维护静海网站建设
  • 国内前十网站建设公司龙之网官网