public static void main(String[] args) {
List<Fpxx> list = ListUtils.intersection(getFpList1(), getFpList2()); for(Fpxx fp:list){
System.out.println(fp);
} System.out.println("size:"+list.size());
} public static List<Fpxx> getFpList1() {
List<Fpxx> list = new ArrayList<Fpxx>();
for(int i=100000;i<200000;i++){
Fpxx fp = new Fpxx();
fp.fpdm = "0223678";
fp.fphm = "3"+i; list.add(fp);
} return list;
} public static List<Fpxx> getFpList2() {
List<Fpxx> list = new ArrayList<Fpxx>();
for(int i=199900;i<199910;i++){
Fpxx fp = new Fpxx();
fp.fpdm = "0223678";
fp.fphm = "3"+i; list.add(fp);
} return list;
}
} class Fpxx {
public String fpdm;
public String fphm; @Override
public int hashCode() {
int hash = 3;
return hash;
} @Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final Fpxx other = (Fpxx) obj;
if ((this.fpdm == null) ? (other.fpdm != null) : !this.fpdm.equals(other.fpdm)) {
return false;
}
if ((this.fphm == null) ? (other.fphm != null) : !this.fphm.equals(other.fphm)) {
return false;
}
return true;
} @Override
public String toString() {
return "Fpxx{" + "fpdm=" + fpdm + ", fphm=" + fphm + '}';
}

最新文章

  1. C#中操作Word(1)—— word对象模型介绍
  2. ORM框架
  3. IAP 程序内购
  4. js生成 1-100 不重复随机数
  5. Oracle系列之游标
  6. Struts的ONGL
  7. SqlServer发送邮件,定时作业
  8. hdu_5783_Divide the Sequence(贪心)
  9. Java多线程之线程的创建
  10. jdk 环境配置踩坑
  11. [Mac] mac linux 多线程下载利器 axel
  12. webpack入门教程--1
  13. 问题:怎么把mysql的系统时间调整为电脑的时间?(已解决)
  14. Hadoop生产环境配置文件
  15. AX_UserInfo
  16. 第一个OC的类
  17. php 连接redis
  18. C++ 模板详解 肥而不腻
  19. [转]php中实现事件驱动
  20. Linq To Object多字段组合唯一校验

热门文章

  1. sharepoint 2013 网站集解锁
  2. win7 64位系统及开发环境重装后的总结
  3. Android tips(八)--&gt;Android Studio打包apk,aar,jar包
  4. ExtJS 4.2 教程-02:bootstrap.js 工作方式
  5. 用开源项目RangBar来实现有范围的SeekBar
  6. Spring MVC 返回类型为字符串时, 返回中文变成&quot;?&quot;处理
  7. MultipleRegularExpressionAttribute MVC中扩展自定义验证规则
  8. The node (XXX.XXX.XXX.XXX,XXX.XXX.XXX.XXX)has already some ScaleIO components installed
  9. Java 读取某个目录下所有文件、文件夹
  10. 大数据开发实战:Hive表DDL和DML