Reads the OK map node types from settings @param settings The settings where the types are read
(Settings settings)
| 100 | * @param settings The settings where the types are read |
| 101 | */ |
| 102 | private void readOkMapNodeTypes(Settings settings) { |
| 103 | if (settings.contains(MAP_SELECT_S)) { |
| 104 | this.okMapNodeTypes = settings.getCsvInts(MAP_SELECT_S); |
| 105 | for (int i : okMapNodeTypes) { |
| 106 | if (i < MapNode.MIN_TYPE || i > MapNode.MAX_TYPE) { |
| 107 | throw new SettingsError("Map type selection '" + i + |
| 108 | "' is out of range for setting " + |
| 109 | settings.getFullPropertyName(MAP_SELECT_S)); |
| 110 | } |
| 111 | if (i > nrofMapFilesRead) { |
| 112 | throw new SettingsError("Can't use map type selection '" + i |
| 113 | + "' for setting " + |
| 114 | settings.getFullPropertyName(MAP_SELECT_S) |
| 115 | + " because only " + nrofMapFilesRead + |
| 116 | " map files are read"); |
| 117 | } |
| 118 | } |
| 119 | } |
| 120 | else { |
| 121 | this.okMapNodeTypes = null; |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | /** |
| 126 | * Copyconstructor. |
no test coverage detected