Get the display text of a stat. @param statValue @return the display text of a stat
(final int statValue)
| 1603 | * @return the display text of a stat |
| 1604 | */ |
| 1605 | public String getStatDisplayText(final int statValue) |
| 1606 | { |
| 1607 | String statText; |
| 1608 | // |
| 1609 | // If no alternate text available, then display the number only |
| 1610 | // |
| 1611 | if (statDisplayText == null) |
| 1612 | { |
| 1613 | statText = Integer.toString(statValue); |
| 1614 | } |
| 1615 | else |
| 1616 | { |
| 1617 | statText = statDisplayText.get(statValue); |
| 1618 | if (statText == null) |
| 1619 | { |
| 1620 | final int firstKey = statDisplayText.firstKey(); |
| 1621 | if (statValue < firstKey) |
| 1622 | { |
| 1623 | statText = "???" + statValue + "???"; |
| 1624 | } |
| 1625 | else |
| 1626 | { |
| 1627 | final int lastKey = statDisplayText.lastKey(); |
| 1628 | |
| 1629 | statText = getStatDisplayText(lastKey) + statDisplayTextAppend |
| 1630 | + getStatDisplayText(statValue - lastKey); |
| 1631 | } |
| 1632 | } |
| 1633 | } |
| 1634 | return statText; |
| 1635 | } |
| 1636 | |
| 1637 | /** |
| 1638 | * Return true if the skill rank display text is there. |
no test coverage detected