I have a List of Objects like List.I want to sort this list alphabetically using Object name field. Object contains 10 field and name field is o
You can use sortThisBy() from Eclipse Collections:
MutableList list = Lists.mutable.empty();
list.sortThisBy(Campaign::getName);
If you can't change the type of list from List:
List list = new ArrayList<>();
ListAdapter.adapt(list).sortThisBy(Campaign::getName);
Note: I am a contributor to Eclipse Collections.