Remove duplicates custom objects from Set/List without equals using stream

前端 未结 0 896
滥情空心
滥情空心 2020-12-04 16:54
     Set responses = someList.stream()
            .map(role -> new Response(param1,
                    param2))
            .collect(toSet());
<         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题