private String getOrdinal ( Integer value ) { String result ; int index = value . intValue ( ) ; if ( index >= ORDINAL . length ) { result = "every " + index + "th" ; } else { result = ORDINAL [ index ] ; } return result ; }
Retrieve the ordinal text for a given integer .