-1

事实上,在这种情况下,我需要一些随机排序的解决方案。我试图排序Collections

SolrDocumentList randSolrDocs = Collections.shuffle(solrDocList)

但收到错误Type mismatch: cannot convert from void to SolrDocumentList

请帮忙。

4

1 回答 1

1

Collections.shuffle(solrDocList)打乱您作为参数传递的列表。该方法没有返回值。

所以调用后,solrDocList是随机的。

于 2013-07-15T12:51:06.510 回答