@param key original key (may include platform extension) @param value the value that goes with the key @param specific where to put the key/value pairs for this platform @return true if a platform-specific key
(String key, String value,
Map<String, String> specific)
| 196 | * @return true if a platform-specific key |
| 197 | */ |
| 198 | static protected boolean isPlatformSpecific(String key, String value, |
| 199 | Map<String, String> specific) { |
| 200 | for (String platform : PConstants.platformNames) { |
| 201 | String ext = "." + platform; |
| 202 | if (key.endsWith(ext)) { |
| 203 | String thisPlatform = PConstants.platformNames[PApplet.platform]; |
| 204 | if (platform.equals(thisPlatform)) { |
| 205 | key = key.substring(0, key.lastIndexOf(ext)); |
| 206 | // store this for later overrides |
| 207 | specific.put(key, value); |
| 208 | //} else { |
| 209 | // ignore platform-specific defaults for other platforms, |
| 210 | // but return 'true' because it needn't be added to the big list |
| 211 | } |
| 212 | return true; |
| 213 | } |
| 214 | } |
| 215 | return false; |
| 216 | } |
| 217 | |
| 218 | |
| 219 | // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |