How to lowercase every element of a collection efficiently?

后端 未结 11 655
走了就别回头了
走了就别回头了 2020-12-02 16:53

What\'s the most efficient way to lower case every element of a List or Set?

My idea for a List:

final List strings = new ArrayList<         


        
11条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-02 17:46

    Try CollectionUtils#transform in Commons Collections for an in-place solution, or Collections2#transform in Guava if you need a live view.

提交回复
热议问题