/**
* Returns a string representation of the receiver, containing the String representation of each key-value pair,
* sorted ascending by value, according to natural ordering.
*/
public String toStringByValue() {
DoubleArrayList theKeys = new DoubleArrayList();
keysSortedByValue(theKeys);
StringBuilder buf = new StringBuilder();
buf.append('[');
int maxIndex = theKeys.size() - 1;
for (int i = 0; i <= maxIndex; i++) {
double key = theKeys.get(i);
buf.append(String.valueOf(key));
buf.append("->");
buf.append(String.valueOf(get(key)));
if (i < maxIndex) {
buf.append(", ");