Revize 65b3210a
Přidáno uživatelem Tomáš Šimandl před asi 6 roky(ů)
sources/src/main/java/cz/zcu/kiv/offscreen/graph/Graph.java | ||
---|---|---|
14 | 14 |
*/ |
15 | 15 |
public class Graph { |
16 | 16 |
|
17 |
private Map<String, Vertex> vertices;
|
|
17 |
private Map<Integer, Vertex> vertices;
|
|
18 | 18 |
private List<Edge> edges; |
19 | 19 |
private List<VertexArchetype> vertexArchetypes; |
20 | 20 |
private List<EdgeArchetype> edgeArchetypes; |
... | ... | |
29 | 29 |
|
30 | 30 |
public Graph() { |
31 | 31 |
logger.trace("ENTRY"); |
32 |
this.vertices = new HashMap<String, Vertex>();
|
|
32 |
this.vertices = new HashMap<Integer, Vertex>();
|
|
33 | 33 |
this.edges = new LinkedList<Edge>(); |
34 | 34 |
logger.trace("EXIT"); |
35 | 35 |
} |
... | ... | |
91 | 91 |
return archetypeIcons; |
92 | 92 |
} |
93 | 93 |
|
94 |
public Map<String, Vertex> getVertices() {
|
|
94 |
public Map<Integer, Vertex> getVertices() {
|
|
95 | 95 |
logger.trace("ENTRY"); |
96 | 96 |
logger.trace("EXIT"); |
97 | 97 |
return vertices; |
... | ... | |
103 | 103 |
logger.trace("EXIT"); |
104 | 104 |
} |
105 | 105 |
|
106 |
public void addVertex(String name, Vertex vertex) {
|
|
106 |
public void addVertex(int id, Vertex vertex) {
|
|
107 | 107 |
logger.trace("ENTRY"); |
108 |
this.vertices.put(name, vertex);
|
|
108 |
this.vertices.put(id, vertex);
|
|
109 | 109 |
logger.trace("EXIT"); |
110 | 110 |
} |
111 | 111 |
|
sources/src/main/java/cz/zcu/kiv/offscreen/graph/GraphManager.java | ||
---|---|---|
511 | 511 |
|
512 | 512 |
Vertex vertex = new Vertex(lastVertexOrGroupId++, vertexImpl.getOriginalId(), title, vertexImpl.getArchetype(), vertexImpl.getText(), attributes); |
513 | 513 |
|
514 |
graph.addVertex("" + vertexImpl.getId(), vertex);
|
|
514 |
graph.addVertex(vertexImpl.getId(), vertex); |
|
515 | 515 |
} |
516 | 516 |
} |
517 | 517 |
|
Také k dispozici: Unified diff
Removed unnecessarily conversion to string