cara mengurutkan intereling di java

CustomList list = new CustomList();
Stream<MyThing> sorted = StreamSupport.stream(
        list.spliterator(), false)
    .sorted();
Vast Vendace