当前位置: 首页>>代码示例>>Java>>正文


Java Settings.getBoolean方法代码示例

本文整理汇总了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;
    }
}
 
开发者ID:chatty,项目名称:chatty,代码行数:23,代码来源:ChatLog.java

示例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);
}
 
开发者ID:chatty,项目名称:chatty,代码行数:18,代码来源:CopyMessages.java

示例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();
    }
}
 
开发者ID:chatty,项目名称:chatty,代码行数:14,代码来源:ChannelFavorites.java


注:本文中的chatty.util.settings.Settings.getBoolean方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。