Author: fanningpj Date: Sun Dec 6 16:46:09 2020 New Revision: 1884157 URL: http://svn.apache.org/viewvc?rev=1884157&view=rev Log: make FontGroup.Range more JavaBean-like
Modified: poi/trunk/src/java/org/apache/poi/common/usermodel/fonts/FontGroup.java Modified: poi/trunk/src/java/org/apache/poi/common/usermodel/fonts/FontGroup.java URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/common/usermodel/fonts/FontGroup.java?rev=1884157&r1=1884156&r2=1884157&view=diff ============================================================================== --- poi/trunk/src/java/org/apache/poi/common/usermodel/fonts/FontGroup.java (original) +++ poi/trunk/src/java/org/apache/poi/common/usermodel/fonts/FontGroup.java Sun Dec 6 16:46:09 2020 @@ -65,12 +65,15 @@ public enum FontGroup { } private static class Range { - final int upper; - final FontGroup fontGroup; + private final int upper; + private final FontGroup fontGroup; Range(int upper, FontGroup fontGroup) { this.upper = upper; this.fontGroup = fontGroup; } + + int getUpper() { return upper; } + FontGroup getFontGroup() { return fontGroup; } } private static NavigableMap<Integer,Range> UCS_RANGES; @@ -154,8 +157,8 @@ public enum FontGroup { private static FontGroup lookup(int codepoint) { // Do a lookup for a match in UCS_RANGES - Map.Entry<Integer,Range> entry = UCS_RANGES.floorEntry(codepoint); + Map.Entry<Integer, Range> entry = UCS_RANGES.floorEntry(codepoint); Range range = (entry != null) ? entry.getValue() : null; - return (range != null && codepoint <= range.upper) ? range.fontGroup : EAST_ASIAN; + return (range != null && codepoint <= range.getUpper()) ? range.getFontGroup() : EAST_ASIAN; } } \ No newline at end of file --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org For additional commands, e-mail: commits-h...@poi.apache.org