net.ctdp.rfdynhud.util
Class ThreeLetterCodeManager
java.lang.Object
net.ctdp.rfdynhud.util.ThreeLetterCodeManager
public class ThreeLetterCodeManager
- extends java.lang.Object
The ThreeLetterCodeManager
loads name-to-code mappings from an
ini file and provides the information to the user.
- Author:
- Marvin Froehlich (CTDP)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ThreeLetterCodeManager
public ThreeLetterCodeManager()
getUpdateId
public static final int getUpdateId()
resetMaps
public static void resetMaps()
updateThreeLetterCodes
public static void updateThreeLetterCodes(ThreeLetterCodeGenerator tlcGenerator)
getThreeLetterCode
public static java.lang.String getThreeLetterCode(java.lang.String driverName,
java.lang.Integer driverID,
ThreeLetterCodeGenerator tlcGenerator)
- Gets the three-letter-code assigned to the given driver-name.
If there is no entry in the three_letter_codes.ini, it wil be generated and a warning will be dumped to the log.
- Parameters:
driverName
- the driver's full namedriverID
- the driver's idtlcGenerator
-
- Returns:
- the three-letter-code.
getShortForm
public static java.lang.String getShortForm(java.lang.String driverName,
java.lang.Integer driverID,
ThreeLetterCodeGenerator tlcGenerator)
- Gets the short form assigned to the given driver-name.
If there is no entry in the three_letter_codes.ini, it wil be generated and a warning will be dumped to the log.
- Parameters:
driverName
- the driver's full namedriverID
- the driver's idtlcGenerator
-
- Returns:
- the short form.