Example usage for java.util Map of

List of usage examples for java.util Map of

Introduction

In this page you can find the example usage for java.util Map of.

Prototype

@SuppressWarnings("unchecked")
static <K, V> Map<K, V> of() 

Source Link

Document

Returns an unmodifiable map containing zero mappings.

Usage

From source file:io.adeptj.runtime.osgi.FrameworkManager.java

private Map<String, String> frameworkConfigs() {
    Map<String, String> configs = this.loadFrameworkProperties();
    Config felixConf = Configs.of().felix();
    configs.put(FELIX_CM_DIR, felixConf.getString(CFG_KEY_FELIX_CM_DIR));
    configs.put(MEM_DUMP_LOC, felixConf.getString(CFG_KEY_MEM_DUMP_LOC));
    Optional.ofNullable(System.getProperty(FELIX_LOG_LEVEL))
            .ifPresent(level -> configs.put(FELIX_LOG_LEVEL, level));
    LOGGER.debug("OSGi Framework Configurations: {}", configs);
    return configs;
}

From source file:com.adeptj.runtime.osgi.FrameworkManager.java

private Map<String, String> frameworkConfigs() {
    Map<String, String> configs = this.loadFrameworkProperties();
    Config felixConf = Configs.of().felix();
    configs.put(FELIX_CM_DIR, felixConf.getString(CFG_KEY_FELIX_CM_DIR));
    configs.put(MEM_DUMP_LOC, felixConf.getString(CFG_KEY_MEM_DUMP_LOC));
    String felixLogLevel = System.getProperty(LOG_LEVEL_PROP);
    if (StringUtils.isNotEmpty(felixLogLevel)) {
        configs.put(LOG_LEVEL_PROP, felixLogLevel);
    }//from  w  w w .  j a va 2s.c o m
    LOGGER.debug("OSGi Framework Configurations: {}", configs);
    return configs;
}