Java - Distinct List of Objects

后端 未结 9 911
不知归路
不知归路 2020-12-05 09:41

I have a list/collection of objects that may or may not have the same property values. What\'s the easiest way to get a distinct list of the objects with equal properties? I

9条回答
  •  爱一瞬间的悲伤
    2020-12-05 10:38

    Actually lambdaj implements this feature through the selectDistinctArgument method

    http://lambdaj.googlecode.com/svn/trunk/html/apidocs/ch/lambdaj/Lambda.html#selectDistinctArgument(java.lang.Object,%20A)

提交回复
热议问题