本文整理汇总了Java中chatty.util.settings.Settings.getBoolean方法的典型用法代码示例。如果您正苦于以下问题:Java Settings.getBoolean方法的具体用法?Java Settings.getBoolean怎么用?Java Settings.getBoolean使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类chatty.util.settings.Settings
的用法示例。
在下文中一共展示了Settings.getBoolean方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ChatLog
import chatty.util.settings.Settings; //导入方法依赖的package包/类
public ChatLog(Settings settings) {
this.settings = settings;
Path path = getPath();
if (path == null) {
log = null;
} else {
String logSplit = settings.getString("logSplit");
boolean logSubdirectories = settings.getBoolean("logSubdirectories");
boolean lockFiles = settings.getBoolean("logLockFiles");
this.log = new LogManager(path, logSplit, logSubdirectories, lockFiles);
}
compactForChannels = new HashMap<>();
try {
String timestamp = settings.getString("logTimestamp");
if (!timestamp.equals("off")) {
sdf = new SimpleDateFormat(timestamp+" ");
}
} catch (IllegalArgumentException ex) {
sdf = null;
}
}
示例2: copyMessage
import chatty.util.settings.Settings; //导入方法依赖的package包/类
public static void copyMessage(Settings settings, User user, String message,
boolean highlighted) {
if (!settings.getBoolean("cmEnabled")) {
return;
}
if (settings.getBoolean("cmHighlightedOnly") && !highlighted) {
return;
}
String channel = settings.getString("cmChannel");
if (!channel.trim().isEmpty() && !channel.equalsIgnoreCase(user.getChannel())) {
return;
}
String text = settings.getString("cmTemplate");
text = text.replaceFirst("\\{user\\}", user.getDisplayNick());
text = text.replaceFirst("\\{message\\}", message);
MiscUtil.copyToClipboard(text);
}
示例3: ChannelFavorites
import chatty.util.settings.Settings; //导入方法依赖的package包/类
/**
* Construct a new object, requires the Settings object to work on. Deletes
* old history entries when constructed.
*
* @param settings The Settings object that contains the favorites and
* history
*/
public ChannelFavorites(Settings settings) {
this.settings = settings;
if (settings.getBoolean("historyClear")) {
removeOld();
}
}