Example usage for org.apache.commons.collections MapUtils getBooleanValue

List of usage examples for org.apache.commons.collections MapUtils getBooleanValue

Introduction

In this page you can find the example usage for org.apache.commons.collections MapUtils getBooleanValue.

Prototype

public static boolean getBooleanValue(final Map map, final Object key, boolean defaultValue) 

Source Link

Document

Gets a boolean from a Map in a null-safe manner, using the default value if the the conversion fails.

Usage

From source file:com.mirth.connect.client.ui.components.rsta.FindReplaceProperties.java

private boolean getOption(String key, boolean def) {
    return MapUtils.getBooleanValue(optionsMap, key, def);
}

From source file:org.datacleaner.user.QuickAnalysisStrategy.java

/**
 * Loads {@link QuickAnalysisStrategy} from a {@link UserPreferences}
 * object./*from   w  w  w.j  a  v a 2  s .c  om*/
 * 
 * @param userPreferences
 * @return
 */
public static QuickAnalysisStrategy loadFromUserPreferences(UserPreferences userPreferences) {
    final Map<String, String> properties = userPreferences.getAdditionalProperties();

    final int columnsPerAnalyzer = MapUtils.getIntValue(properties,
            USER_PREFERENCES_NAMESPACE + ".columnsPerAnalyzer", 5);
    final boolean includeValueDistribution = MapUtils.getBooleanValue(properties,
            USER_PREFERENCES_NAMESPACE + ".includeValueDistribution", false);
    final boolean includePatternFinder = MapUtils.getBooleanValue(properties,
            USER_PREFERENCES_NAMESPACE + ".includePatternFinder", false);

    return new QuickAnalysisStrategy(columnsPerAnalyzer, includeValueDistribution, includePatternFinder);
}