Get the value of the token. @param tokenSource The full source of the token @param display The character to retrieve the value for. @param eh The ExportHandler that is managing the export. @return The value of the token.
(String tokenSource, CharacterDisplay display, ExportHandler eh)
| 53 | * @return The value of the token. |
| 54 | */ |
| 55 | @Override |
| 56 | public String getToken(String tokenSource, CharacterDisplay display, ExportHandler eh) |
| 57 | { |
| 58 | String retString; |
| 59 | if ("WEIGHT".equals(tokenSource)) |
| 60 | { |
| 61 | retString = getWeightToken(display); |
| 62 | } |
| 63 | else if ("WEIGHT.NOUNIT".equals(tokenSource)) |
| 64 | { |
| 65 | retString = getNoUnitWeight(display); |
| 66 | } |
| 67 | else |
| 68 | { |
| 69 | String type = tokenSource.substring(tokenSource.lastIndexOf('.') + 1); |
| 70 | retString = Globals.getGameModeUnitSet().displayWeightInUnitSet(display.getLoadToken(type)); |
| 71 | } |
| 72 | |
| 73 | return retString; |
| 74 | } |
| 75 | |
| 76 | private String getNoUnitWeight(CharacterDisplay display) |
| 77 | { |
nothing calls this directly
no test coverage detected