public static String toUpcaseString ( final int aInt ) { switch ( aInt ) { case 1 : return "First" ; case 2 : return "Second" ; case 3 : return "Third" ; case 4 : return "Fourth" ; case 5 : return "Fifth" ; case 6 : return "Sixth" ; case 7 : return "Seventh" ; case 8 : return "Eighth" ; case 9 : return "Ninth" ; case 10 : return "Tenth" ; case 11 : return "Eleventh" ; case 12 : return "Twelveth" ; case 13 : return "Thirteenth" ; case 14 : return "Fourteenth" ; case 15 : return "Fifthteenth" ; case 16 : return "Sixteenth" ; case 17 : return "Seventeenth" ; case 18 : return "Eighteenth" ; case 19 : return "Nineteenth" ; case 20 : return "Twentieth" ; default : throw new UnsupportedOperationException ( LOGGER . getI18n ( MessageCodes . UTIL_046 , aInt ) ) ; } }
Returns an up - cased human - friendly string representation for the supplied int ; for instance 1 becomes First 2 becomes Second etc .