I have the following code to to run Joiner to concat keys. However, they show up out of order.
BiMap<String, String> whatever= HashBiMap.create();
{
whatever.put("First group", "f1");
whatever.put("This should really be second", "f2");
whatever.put("3rd group", "f3");
}
String groups = Joiner.on('|').join(whatever.keySet());
System.out.println(groups);
output:
This should really be second|3rd group|First group
expected output:
First group|This should really be second|3rd group
How do I get these to show up in order because it's important considering they are going to evaluated in a boolean expresion?