filter and sort list using google collections

前端 未结 4 926
被撕碎了的回忆
被撕碎了的回忆 2020-12-23 12:08

Suppose I have a list (or Set):

List testList = Lists.newArrayList(\"assocX\",\"srcT\",\"destA\",\"srcX\", \"don\'t care Y\", \"garbage\", \"sr         


        
4条回答
  •  没有蜡笔的小新
    2020-12-23 12:32

    I think you'll have first to use the predicate to eliminate elements you don't want, and the implement a Comparator and sort your list.

提交回复
热议问题