public void addEdge(Course source, Course target) { if (this.edges.containsKey(source.getName())) { this.edges.get(source.getName()).put(target.getName(), target); } else { this.edges.put(source.getName(), new HashMap<String, Course>()); this.edges.get(source.getName()).put(target.getName(), target); } }
public void addNode(Course course) { if (!this.nodes.containsKey(course.getName())) { this.nodes.put(course.getName(), course); } }