Changeset 13907 in josm
- Timestamp:
- 2018-06-10T21:05:01+02:00 (6 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/IWay.java
r13766 r13907 68 68 69 69 /** 70 * Set new list of nodes to way. This method is preferred to multiple calls to addNode/removeNode 71 * and similar methods because nodes are internally saved as array which means lower memory overhead 72 * but also slower modifying operations. 73 * @param nodes New way nodes. Can be null, in that case all way nodes are removed 74 */ 75 void setNodes(List<N> nodes); 76 77 /** 70 78 * Determines if this way is closed. 71 79 * @return {@code true} if this way is closed, {@code false} otherwise -
trunk/src/org/openstreetmap/josm/data/osm/Way.java
r13816 r13907 40 40 } 41 41 42 /** 43 * Set new list of nodes to way. This method is preferred to multiple calls to addNode/removeNode 44 * and similar methods because nodes are internally saved as array which means lower memory overhead 45 * but also slower modifying operations. 46 * @param nodes New way nodes. Can be null, in that case all way nodes are removed 47 * @since 1862 48 */ 42 @Override 49 43 public void setNodes(List<Node> nodes) { 50 44 checkDatasetNotReadOnly(); -
trunk/src/org/openstreetmap/josm/data/osm/WayData.java
r13764 r13907 71 71 } 72 72 73 @Override 74 public void setNodes(List<NodeData> nodes) { 75 throw new UnsupportedOperationException("Use setNodeIds(List) instead"); 76 } 77 73 78 /** 74 79 * Sets the nodes array 75 80 * @param nodes The nodes this way consists of 81 * @since 13907 76 82 */ 77 public void setNode s(List<Long> nodes) {83 public void setNodeIds(List<Long> nodes) { 78 84 this.nodes = new ArrayList<>(nodes); 79 85 } -
trunk/src/org/openstreetmap/josm/data/osm/history/HistoryWay.java
r11878 r13907 153 153 public WayData fillPrimitiveData(WayData data) { 154 154 super.fillPrimitiveCommonData(data); 155 data.setNode s(nodeIds);155 data.setNodeIds(nodeIds); 156 156 return data; 157 157 } -
trunk/src/org/openstreetmap/josm/data/osm/visitor/MergeSourceBuildingVisitor.java
r12809 r13907 82 82 newNodes.add(mappedPrimitives.get(n).getUniqueId()); 83 83 } 84 clone.setNode s(newNodes);84 clone.setNodeIds(newNodes); 85 85 mappedPrimitives.put(w, clone); 86 86 } -
trunk/src/org/openstreetmap/josm/gui/datatransfer/importers/PrimitiveDataPaster.java
r13717 r13907 132 132 } 133 133 } 134 ((WayData) data).setNode s(newNodes);134 ((WayData) data).setNodeIds(newNodes); 135 135 } 136 136 -
trunk/test/unit/org/openstreetmap/josm/command/AddPrimitivesCommandTest.java
r13079 r13907 268 268 WayData way = new WayData(); 269 269 way.put("test", "test"); 270 way.setNode s(Arrays.asList(node1.getId(), node2.getId()));270 way.setNodeIds(Arrays.asList(node1.getId(), node2.getId())); 271 271 List<PrimitiveData> testData = Arrays.<PrimitiveData>asList(node1, node2, way); 272 272 return testData; -
trunk/test/unit/org/openstreetmap/josm/data/osm/WayDataTest.java
r11324 r13907 19 19 public void testSerializationForDragAndDrop() throws Exception { 20 20 final WayData data = new WayData(); 21 data.setNode s(Arrays.asList(1415L, 9265L, 3589L, 7932L, 3846L));21 data.setNodeIds(Arrays.asList(1415L, 9265L, 3589L, 7932L, 3846L)); 22 22 data.setId(314); 23 23 data.setVersion(14);
Note:
See TracChangeset
for help on using the changeset viewer.