How can I convert this:
return this.subjects.entrySet()
.stream()
.collect(Collectors.toMap(e -> getArtistryCopy(e.getKey()), Map.Entry::getValue));
To return a LinkedHashMap instead of a map?
If you need to know, this.subjects
is a LinkedHashMap<AbstractArtistries, ArrayList<AbstractCommand>>
. AbstractArtistry and command are two custom objects I made. I need the order to be maintained.
getArtistryCopy()
returns a copy of an AbstractArtistry (which is the key).