Changeset 12726 in josm for trunk/src/org/openstreetmap/josm/command/TransformNodesCommand.java
- Timestamp:
- 2017-09-04T23:45:49+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/command/TransformNodesCommand.java
r10663 r12726 6 6 import java.util.Collection; 7 7 import java.util.HashMap; 8 import java.util.LinkedList;9 8 import java.util.Map; 9 import java.util.NoSuchElementException; 10 10 import java.util.Objects; 11 11 … … 28 28 * The nodes to transform. 29 29 */ 30 protected Collection<Node> nodes = new LinkedList<>();30 protected final Collection<Node> nodes; 31 31 32 32 /** 33 33 * List of all old states of the nodes. 34 34 */ 35 protected Map<Node, OldNodeState> oldStates = new HashMap<>();35 protected final Map<Node, OldNodeState> oldStates = new HashMap<>(); 36 36 37 37 /** … … 47 47 * Creates a TransformNodesObject. 48 48 * Find out the impacted nodes and store their initial state. 49 * @param objects objects to fetch nodes from 49 * @param objects objects to fetch nodes from. Must neither be null nor empty. Items must belong to a data set 50 * @throws NullPointerException if objects is null or contain null item 51 * @throws NoSuchElementException if objects is empty 50 52 */ 51 53 public TransformNodesCommand(Collection<? extends OsmPrimitive> objects) { 54 super(objects.iterator().next().getDataSet()); 52 55 this.nodes = AllNodesVisitor.getAllNodes(objects); 53 56 storeOldState();
Note:
See TracChangeset
for help on using the changeset viewer.