當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。