Here you can find the source of toSortedList(Collection
Parameter | Description |
---|---|
in | a parameter |
static public List<String> toSortedList(Collection<String> in)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; public class Main { /**//from w ww . j a v a 2 s. com * * @param in * @return */ static public List<String> toSortedList(Collection<String> in) { List<String> out = new ArrayList<>(in); Collections.sort(out); return Collections.unmodifiableList(out); } }