better method name

This commit is contained in:
rusefillc 2022-07-12 06:16:05 -04:00
parent 5870d65d26
commit 7475f63111
2 changed files with 3 additions and 4 deletions

View File

@ -66,6 +66,6 @@ public class VariableRegistryTest {
input.put(1, "A");
input.put(2, "Z");
input.put(3, "N");
assertEquals("0=\"NONE\",1=\"A\",3=\"N\",2=\"Z\"", VariableRegistry.getString(input));
assertEquals("0=\"NONE\",1=\"A\",3=\"N\",2=\"Z\"", VariableRegistry.getHumanSortedTsKeyValueString(input));
}
}

View File

@ -9,7 +9,6 @@ import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Map;
import java.util.TreeMap;
@ -126,7 +125,7 @@ public class VariableRegistry {
if (valueNameById == null)
return null;
return getString(valueNameById);
return getHumanSortedTsKeyValueString(valueNameById);
}
private static String quote(String string) {
@ -134,7 +133,7 @@ public class VariableRegistry {
}
@NotNull
public static String getString(Map<Integer, String> valueNameById) {
public static String getHumanSortedTsKeyValueString(Map<Integer, String> valueNameById) {
TreeMap<Integer, String> humanDropDownSorted = new TreeMap<>((o1, o2) -> {
if (o1.intValue() == o2)
return 0;