Package org.codemap.marker

Source Code of org.codemap.marker.MarkerSelection

package org.codemap.marker;

import java.util.HashMap;
import java.util.Map;

import org.codemap.MapSelection;


public class MarkerSelection {
   
    private MapSelection selection;
    private HashMap<String, Integer> severityMap;

    public MarkerSelection() {
        selection = new MapSelection();
        severityMap = new HashMap<String, Integer>();
    }

    public int getSeverity(String document) {
        return severityMap.get(document);
    }

    public void addAll(Map<String, Integer> map) {
        severityMap.putAll(map);
        selection.addAll(map.keySet());
    }

    public void remove(String identifier) {
        severityMap.remove(identifier);
        selection.remove(identifier);
    }

    public void add(String identifier, int severity) {
        severityMap.put(identifier, severity);
        selection.add(identifier);
    }

    public void clear() {
        severityMap.clear();
        selection.clear();
    }

    public MapSelection getSelection() {
        return selection;
    }

}
TOP

Related Classes of org.codemap.marker.MarkerSelection

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.