rename get to getInt
This commit is contained in:
@@ -53,7 +53,7 @@ public class StringCompressor {
|
||||
}
|
||||
|
||||
public int getIfPresent(final String string) {
|
||||
final Integer integer = usip.get(string);
|
||||
final Integer integer = usip.getInt(string);
|
||||
return integer != null ? integer : -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -179,7 +179,7 @@ public class UniqueStringIntegerPairs {
|
||||
bytesToInt.put(new ByteArray(string), integer);
|
||||
}
|
||||
|
||||
public Integer get(final String string) {
|
||||
public Integer getInt(final String string) {
|
||||
|
||||
return stringToInt.get(string);
|
||||
}
|
||||
|
||||
@@ -34,14 +34,14 @@ public class UniqueStringIntegerPairsTest {
|
||||
final UniqueStringIntegerPairs usip = new UniqueStringIntegerPairs(database);
|
||||
|
||||
usip.putStringAndInteger(first, second);
|
||||
Assertions.assertEquals(second, usip.get(first));
|
||||
Assertions.assertEquals(second, usip.getInt(first));
|
||||
Assertions.assertEquals(first, usip.getKey(second));
|
||||
}
|
||||
|
||||
{
|
||||
final UniqueStringIntegerPairs usip = new UniqueStringIntegerPairs(database);
|
||||
|
||||
Assertions.assertEquals(second, usip.get(first));
|
||||
Assertions.assertEquals(second, usip.getInt(first));
|
||||
Assertions.assertEquals(first, usip.getKey(second));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user