Why is there no SortedList in Java?

后端 未结 12 797
猫巷女王i
猫巷女王i 2020-11-22 04:15

In Java there are the SortedSet and SortedMap interfaces. Both belong to the Java Collections framework and provide a sorted way to access the elements.

However, in

12条回答
  •  悲哀的现实
    2020-11-22 05:13

    JavaFX SortedList

    Though it took a while, Java 8 does have a sorted List. http://docs.oracle.com/javase/8/javafx/api/javafx/collections/transformation/SortedList.html

    As you can see in the javadocs, it is part of the JavaFX collections, intended to provide a sorted view on an ObservableList.

    Update: Note that with Java 11, the JavaFX toolkit has moved outside the JDK and is now a separate library. JavaFX 11 is available as a downloadable SDK or from MavenCentral. See https://openjfx.io

提交回复
热议问题