rename getKey to getString
This commit is contained in:
@@ -49,7 +49,7 @@ public class StringCompressor {
|
|||||||
|
|
||||||
public String getString(final int integer) {
|
public String getString(final int integer) {
|
||||||
|
|
||||||
return usip.getKey(integer);
|
return usip.getString(integer);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getIfPresent(final String string) {
|
public int getIfPresent(final String string) {
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ public class UniqueStringIntegerPairs {
|
|||||||
return stringToInt.get(string);
|
return stringToInt.get(string);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getKey(final int second) {
|
public String getString(final int second) {
|
||||||
return intToString.get(second);
|
return intToString.get(second);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,14 +35,14 @@ public class UniqueStringIntegerPairsTest {
|
|||||||
|
|
||||||
usip.putStringAndInteger(first, second);
|
usip.putStringAndInteger(first, second);
|
||||||
Assertions.assertEquals(second, usip.getInt(first));
|
Assertions.assertEquals(second, usip.getInt(first));
|
||||||
Assertions.assertEquals(first, usip.getKey(second));
|
Assertions.assertEquals(first, usip.getString(second));
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
final UniqueStringIntegerPairs usip = new UniqueStringIntegerPairs(database);
|
final UniqueStringIntegerPairs usip = new UniqueStringIntegerPairs(database);
|
||||||
|
|
||||||
Assertions.assertEquals(second, usip.getInt(first));
|
Assertions.assertEquals(second, usip.getInt(first));
|
||||||
Assertions.assertEquals(first, usip.getKey(second));
|
Assertions.assertEquals(first, usip.getString(second));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user