rename put method to help IDEs find references
This commit is contained in:
@@ -165,7 +165,7 @@ public class UniqueStringIntegerPairs {
|
||||
intToString.set(value, string);
|
||||
}
|
||||
|
||||
void put(final String string, final int integer) {
|
||||
void putStringAndInteger(final String string, final int integer) {
|
||||
|
||||
if (stringToInt.containsKey(string) || (intToString.size() > integer && intToString.get(integer) != null)) {
|
||||
throw new IllegalArgumentException("Unique key constraint violation for (" + string + ", " + integer + ")");
|
||||
@@ -197,7 +197,7 @@ public class UniqueStringIntegerPairs {
|
||||
synchronized (stringToInt) {
|
||||
if (!stringToInt.containsKey(string)) {
|
||||
final Integer second = mappingFunction.apply(string);
|
||||
put(string, second);
|
||||
putStringAndInteger(string, second);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -231,7 +231,8 @@ public class UniqueStringIntegerPairs {
|
||||
}
|
||||
|
||||
final Integer integer = intToString.size();
|
||||
put(normalizedString, integer); // adds the normalized String to stringToInt and bytesToInt
|
||||
putStringAndInteger(normalizedString, integer); // adds the normalized String to stringToInt and
|
||||
// bytesToInt
|
||||
bytesToInt.put(byteArray, integer); // also add the original String to bytesToInt, because it is
|
||||
// used as cache
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user