rename get to getString

This commit is contained in:
2021-10-16 19:57:34 +02:00
parent 491e88463a
commit 2ea11e6adb
5 changed files with 14 additions and 14 deletions

View File

@@ -47,7 +47,7 @@ public class StringCompressor {
return usip.computeIfAbsent(processedValue);
}
public String get(final int integer) {
public String getString(final int integer) {
return usip.getKey(integer);
}
@@ -70,11 +70,11 @@ public class StringCompressor {
}
public String getKeyAsString(final Tag tag) {
return get(tag.getKey());
return getString(tag.getKey());
}
public String getValueAsString(final Tag tag) {
return get(tag.getValue());
return getString(tag.getValue());
}
public Tags createAndAddToDictionary(final String key, final String value) {
@@ -138,7 +138,7 @@ public class StringCompressor {
result.append(DEFAULT_GROUP);
} else {
for (final Tag tag : tags.toTags()) {
final String value = get(tag.getValue());
final String value = getString(tag.getValue());
if (result.length() > 0) {
result.append(" / ");
}
@@ -157,9 +157,9 @@ public class StringCompressor {
result.append(", ");
}
result.append(get(tag.getKey()));
result.append(getString(tag.getKey()));
result.append("=");
result.append(get(tag.getValue()));
result.append(getString(tag.getValue()));
}
return result.toString();

View File

@@ -133,7 +133,7 @@ public class Tags implements Comparable<Tags> {
final int index = Collections.binarySearch(tags, needle, TagByKeyComparator.INSTANCE);
if (index >= 0) {
final Tag tag = tags.get(index);
return STRING_COMPRESSOR.get(tag.getValue());
return STRING_COMPRESSOR.getString(tag.getValue());
}
return null;
}
@@ -152,7 +152,7 @@ public class Tags implements Comparable<Tags> {
public Set<String> getKeys() {
final TreeSet<String> result = new TreeSet<>();
for (final Tag tag : tags) {
result.add(STRING_COMPRESSOR.get(tag.getKey()));
result.add(STRING_COMPRESSOR.getString(tag.getKey()));
}
return result;
}