I am building a multi-platform library for graphs and I’d really need a TreeMap to sort the frontier. I was trying to rewrite it as is in java.utils but its implementation is so rooted in the JDK that is insane (if not illegal) to translate all the files required from Java to Kotlin just for the class I need.
I never realized how hard is to manipulate complex data without java.utils…
Anyone knows an intelligent way to get a TreeMap up and running other then studying it and manually implementing it from scratch?
An alternative would be to use a wrapped LinkedHashMap where .put() creates a new map with the new entry in the correct position.
I think that general solution is to find a job implementation and wrap it in ‘actual’ declaration. But it is probably better to also write a feature request for standard library. I would support it.