本文整理了Java中com.jme3.system.AppSettings.containsKey()
方法的一些代码示例,展示了AppSettings.containsKey()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AppSettings.containsKey()
方法的具体详情如下:
包路径:com.jme3.system.AppSettings
类名称:AppSettings
方法名:containsKey
暂无
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
/**
* Same as {@link #copyFrom(com.jme3.system.AppSettings) }, except
* doesn't overwrite settings that are already set.
*
* @param other The AppSettings to merge the settings from
*/
public void mergeFrom(AppSettings other) {
for (String key : other.keySet()) {
if( !this.containsKey(key) ) {
put(key, other.get(key));
}
}
}
代码示例来源:origin: tonihele/OpenKeeper
/**
* Check whether the given key exists
*
* @param setting the setting
* @return true if given setting exists
*/
public boolean containsSetting(ISetting setting) {
return settings.containsKey(setting.getKey());
}
代码示例来源:origin: tonihele/OpenKeeper
private Settings(final AppSettings settings) {
// Init the settings
this.settings = settings;
//Default resolution
if (!this.settings.containsKey("Width") || !this.settings.containsKey("Height")) {
this.settings.setResolution(800, 600); // Default resolution
}
File settingsFile = new File(USER_SETTINGS_FILE);
if (settingsFile.exists()) {
try (InputStream is = new FileInputStream(settingsFile)) {
this.settings.load(is);
} catch (IOException ex) {
LOGGER.log(java.util.logging.Level.WARNING, "Settings file failed to load from " + settingsFile + "!", ex);
}
}
this.settings.setFrameRate(Math.max(MAX_FPS, settings.getFrequency()));
// Assing some app level settings
settings.setTitle(TITLE);
settings.setIcons(getApplicationIcons());
}
内容来源于网络,如有侵权,请联系作者删除!