Skip to content
Snippets Groups Projects

Resolve "prettier configuration and hooks"

Merged Colin DAMON requested to merge 7-prettier-configuration-and-hooks into master
Files
11
@@ -4,11 +4,9 @@ import java.util.NavigableMap;
import java.util.TreeMap;
public final class Numerals {
private static final NavigableMap<Integer, Roman> CONVERSIONS = buildConversions();
private Numerals() {
}
private Numerals() {}
public static String toRoman(int arabic) {
if (arabic <= 0) {
@@ -17,11 +15,9 @@ public final class Numerals {
Integer highestKnownConversion = CONVERSIONS.floorKey(arabic);
String highestKnownRepresentation = CONVERSIONS.get(highestKnownConversion)
.getRepresentation();
String highestKnownRepresentation = CONVERSIONS.get(highestKnownConversion).getRepresentation();
return highestKnownRepresentation
+ toRoman(arabic - highestKnownConversion);
return (highestKnownRepresentation + toRoman(arabic - highestKnownConversion));
}
private static NavigableMap<Integer, Roman> buildConversions() {
@@ -34,6 +30,5 @@ public final class Numerals {
conversions.put(10, Roman.TEN);
return conversions;
}
}
Loading