I am using TreeBidiMap from the Apache Collections library. I want to sort this on the values which are doubles.
TreeBidiMap
doubles
My method is to retrieve a
Java 10 introduced List#copyOf which returns unmodifiable List while preserving the order:
List#copyOf
List list = List.copyOf(coll);