// Path: src/main/java/uk/me/mjt/ch/status/DiscardingStatusMonitor.java
// public class DiscardingStatusMonitor implements StatusMonitor {
//     @Override
//     public void updateStatus(MonitoredProcess process, long completed, long total) { }
// }
// 
// Path: src/main/java/uk/me/mjt/ch/status/MonitoredProcess.java
// public enum MonitoredProcess {
//     LOAD_NODES, LOAD_WAYS, INDEX_MAP_DATA, VALIDATE_DATA
// }
// 
// Path: src/main/java/uk/me/mjt/ch/status/StatusMonitor.java
// public interface StatusMonitor {
//     
//     public void updateStatus(MonitoredProcess process, long completed, long total);
//     
// }


import java.util.*;
import java.util.concurrent.atomic.AtomicLong;
import uk.me.mjt.ch.status.DiscardingStatusMonitor;
import uk.me.mjt.ch.status.MonitoredProcess;
import uk.me.mjt.ch.status.StatusMonitor;

package uk.me.mjt.ch;


public class MapData {
    private final HashMap<Long,Node> nodesById;
    private final Set<TurnRestriction> turnRestrictions;
    private final AtomicLong maxEdgeId = new AtomicLong();
    private final Multimap<Long,Node> nodesBySourceDataNodeId = new Multimap<>();
    
    public MapData(Collection<Node> nodes) {
        this(indexNodesById(nodes), new HashSet(), new DiscardingStatusMonitor());
    }
    
    public MapData(HashMap<Long,Node> nodesById) {
        this(nodesById, new HashSet(), new DiscardingStatusMonitor());
    }
    
// Path: src/main/java/uk/me/mjt/ch/status/DiscardingStatusMonitor.java
// public class DiscardingStatusMonitor implements StatusMonitor {
//     @Override
//     public void updateStatus(MonitoredProcess process, long completed, long total) { }
// }
// 
// Path: src/main/java/uk/me/mjt/ch/status/MonitoredProcess.java
// public enum MonitoredProcess {
//     LOAD_NODES, LOAD_WAYS, INDEX_MAP_DATA, VALIDATE_DATA
// }
// 
// Path: src/main/java/uk/me/mjt/ch/status/StatusMonitor.java
// public interface StatusMonitor {
//     
//     public void updateStatus(MonitoredProcess process, long completed, long total);
//     
// }


// Path: src/main/java/uk/me/mjt/ch/MapData.java
import java.util.*;
import java.util.concurrent.atomic.AtomicLong;
import uk.me.mjt.ch.status.DiscardingStatusMonitor;
import uk.me.mjt.ch.status.MonitoredProcess;
import uk.me.mjt.ch.status.StatusMonitor;


package uk.me.mjt.ch;


public class MapData {
    private final HashMap<Long,Node> nodesById;
    private final Set<TurnRestriction> turnRestrictions;
    private final AtomicLong maxEdgeId = new AtomicLong();
    private final Multimap<Long,Node> nodesBySourceDataNodeId = new Multimap<>();
    
    public MapData(Collection<Node> nodes) {
        this(indexNodesById(nodes), new HashSet(), new DiscardingStatusMonitor());
    }
    
    public MapData(HashMap<Long,Node> nodesById) {
        this(nodesById, new HashSet(), new DiscardingStatusMonitor());
    }
    
    public MapData(HashMap<Long,Node> nodesById, Set<TurnRestriction> turnRestrictions, StatusMonitor monitor) {