Example usage for java.util Collections unmodifiableMap

List of usage examples for java.util Collections unmodifiableMap

Introduction

In this page you can find the example usage for java.util Collections unmodifiableMap.

Prototype

public static <K, V> Map<K, V> unmodifiableMap(Map<? extends K, ? extends V> m) 

Source Link

Document

Returns an unmodifiable view of the specified map.

Usage

From source file:ru.jts_dev.gameserver.parser.data.item.ItemDatasHolder.java

public final Map<Integer, SetData> getSetsData() {
    return Collections.unmodifiableMap(setsData);
}

From source file:edu.ksu.cis.indus.staticanalyses.callgraphs.CallInfo.java

/**
 * @see CallGraphInfo.ICallInfo#getCallee2CallersMap()
 *//*  www .  j av a2 s .c  om*/
public Map<SootMethod, Collection<CallTriple>> getCallee2CallersMap() {
    return Collections.unmodifiableMap(callee2callers);
}

From source file:channellistmaker.dataextractor.AbstractAllEPGFileExtractor.java

/**
 * ????XML?? getExtractor()?????????????
 *
 * @return ???/* w  ww .ja  v  a 2  s .c  o m*/
 */
public final synchronized Map<MultiKey<Integer>, T> getAllEPGRecords() {
    Map<MultiKey<Integer>, T> temp1 = new ConcurrentHashMap<>();
    LOG.info("XML? = " + this.EPGXMLs.size());
    for (Document D : this.EPGXMLs) {
        Map<MultiKey<Integer>, T> temp2;
        temp2 = this.getExtractor(D).makeMap();
        temp1.putAll(temp2);
    }
    return Collections.unmodifiableMap(temp1);
}

From source file:com.yahoo.bard.webservice.util.Utils.java

/**
 * A recursive call to make a map and all it's values immutable.
 *
 * @param <K>  The key type of the map
 * @param <V>  The value type of the map
 * @param mutableMap  The original, potentially mutable, map
 *
 * @return An immutable Map with all it's values made immutable.
 *//*from  w ww  .  ja v a2  s. c  om*/
public static <K, V> Map<K, V> makeImmutable(Map<K, V> mutableMap) {
    Map<K, V> newMap = new HashMap<>();
    for (Map.Entry<K, V> entry : mutableMap.entrySet()) {
        newMap.put(entry.getKey(), Utils.makeImmutable(entry.getValue()));
    }
    return Collections.unmodifiableMap(newMap);
}

From source file:li.klass.fhem.domain.setlist.SetList.java

public Map<String, SetListValue> getEntries() {
    return Collections.unmodifiableMap(entries);
}

From source file:name.richardson.james.bukkit.utilities.command.AbstractCommandInvoker.java

@Override
public final Map<String, Command> getCommands() {
    return Collections.unmodifiableMap(commandMap);
}

From source file:org.zalando.problem.DefaultProblem.java

@Override
public Map<String, Object> getParameters() {
    return Collections.unmodifiableMap(parameters);
}

From source file:io.fabric8.maven.core.config.ProcessorConfig.java

/**
 * Return full configuration as raw string-string values
 *
 * @param name name of the enricher / generator
 * @return unmodifiable map of the original config
 *//*from  w ww .j  a  v  a2s  . co  m*/
public Map<String, String> getConfigMap(String name) {
    return config.containsKey(name) ? Collections.unmodifiableMap(config.get(name))
            : Collections.<String, String>emptyMap();
}

From source file:com.neelo.glue.ApplicationModule.java

public final void configure(Binder binder) {
    this.routes = new ArrayList<Route>();
    this.ids = new HashMap<String, Route>();

    binder.bind(RequestResolver.class).toInstance(this);
    binder.bind(ResponseResolver.class).to(DefaultResponseResolver.class);
    routes();/*from  w ww. j av  a2s.c  om*/

    this.routes = Collections.unmodifiableList(routes);
    for (Route route : routes) {
        if (route.getName() != null) {
            ids.put(route.getName(), route);
        }
    }
    this.ids = Collections.unmodifiableMap(ids);

    Module[] additional = install();
    for (Module module : additional) {
        binder.install(module);
    }
}

From source file:ru.jts_dev.gameserver.parser.impl.SettingsHolder.java

public final Map<CharacterClass, Map<String, Integer>> getInitialEquipments() {
    return Collections.unmodifiableMap(initialEquipments);
}