Changeset 6106 in josm
- Timestamp:
- 2013-08-03T00:21:50+02:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java
r6084 r6106 154 154 unreversedTagWays.removeAll(reversedWays); 155 155 ReverseWayTagCorrector reverseWayTagCorrector = new ReverseWayTagCorrector(); 156 List<Way> reversedTagWays = new ArrayList<Way>( );156 List<Way> reversedTagWays = new ArrayList<Way>(reversedWays.size()); 157 157 Collection<Command> changePropertyCommands = null; 158 158 for (Way w : reversedWays) { … … 497 497 498 498 protected Set<Node> getNodes(Stack<NodePair> pairs) { 499 HashSet<Node> nodes = new LinkedHashSet<Node>( );499 HashSet<Node> nodes = new LinkedHashSet<Node>(2*pairs.size()); 500 500 for (NodePair pair: pairs) { 501 501 nodes.add(pair.getA()); … … 517 517 518 518 protected Set<Node> getNodes() { 519 Set<Node> nodes = new LinkedHashSet<Node>( );519 Set<Node> nodes = new LinkedHashSet<Node>(2 * edges.size()); 520 520 for (NodePair pair: edges) { 521 521 nodes.add(pair.getA()); -
trunk/src/org/openstreetmap/josm/actions/CreateCircleAction.java
r6093 r6106 137 137 138 138 // build a way for the circle 139 List<Node> wayToAdd = new ArrayList<Node>( );139 List<Node> wayToAdd = new ArrayList<Node>(numberOfNodesInCircle + 1); 140 140 141 141 for (int i = 1; i <= numberOfNodesInCircle; i++) { -
trunk/src/org/openstreetmap/josm/actions/PasteTagsAction.java
r6069 r6106 263 263 public static boolean pasteTagsFromText(Collection<OsmPrimitive> selection, String text) { 264 264 Map<String, String> tags = TextTagParser.readTagsFromText(text); 265 List<Command> commands = new ArrayList<Command>();266 265 if (tags==null || tags.isEmpty()) { 267 266 TextTagParser.showBadBufferMessage(help); … … 269 268 } 270 269 if (!TextTagParser.validateTags(tags)) return false; 270 271 List<Command> commands = new ArrayList<Command>(tags.size()); 271 272 String v; 272 273 for (String key: tags.keySet()) { -
trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java
r6084 r6106 103 103 searchHistory.removeLast(); 104 104 } 105 List<String> savedHistory = new ArrayList<String>( );105 List<String> savedHistory = new ArrayList<String>(searchHistory.size()); 106 106 for (SearchSetting item: searchHistory) { 107 107 savedHistory.add(item.writeToString()); -
trunk/src/org/openstreetmap/josm/command/DeleteCommand.java
r6104 r6106 202 202 return null; 203 203 else { 204 List<PseudoCommand> children = new ArrayList<PseudoCommand>( );204 List<PseudoCommand> children = new ArrayList<PseudoCommand>(toDelete.size()); 205 205 for (final OsmPrimitive osm : toDelete) { 206 206 children.add(new PseudoCommand() { -
trunk/src/org/openstreetmap/josm/data/validation/tests/SimilarNamedWays.java
r6085 r6106 80 80 int levenshteinDistance = getLevenshteinDistance(name, name2); 81 81 if (0 < levenshteinDistance && levenshteinDistance <= 2) { 82 List<OsmPrimitive> primitives = new ArrayList<OsmPrimitive>( );82 List<OsmPrimitive> primitives = new ArrayList<OsmPrimitive>(2); 83 83 primitives.add(w); 84 84 primitives.add(w2); -
trunk/src/org/openstreetmap/josm/data/validation/tests/UnconnectedWays.java
r5920 r6106 245 245 LatLon topLeft = new LatLon(y2+fudge, x1-fudge); 246 246 LatLon botRight = new LatLon(y1-fudge, x2+fudge); 247 List<LatLon> ret = new ArrayList<LatLon>( );247 List<LatLon> ret = new ArrayList<LatLon>(2); 248 248 ret.add(topLeft); 249 249 ret.add(botRight); -
trunk/src/org/openstreetmap/josm/gui/MapStatus.java
r6101 r6106 313 313 // These labels may need to be updated from the outside 314 314 // so collect them 315 List<JLabel> lbls = new ArrayList<JLabel>( );315 List<JLabel> lbls = new ArrayList<JLabel>(osms.size()); 316 316 for (final OsmPrimitive osm : osms) { 317 317 JLabel l = popupBuildPrimitiveLabels(osm); -
trunk/src/org/openstreetmap/josm/gui/io/CloseChangesetDialog.java
r6084 r6106 214 214 public Collection<Changeset> getSelectedChangesets() { 215 215 Object [] sel = lstOpenChangesets.getSelectedValues(); 216 ArrayList<Changeset> ret = new ArrayList<Changeset>( );216 ArrayList<Changeset> ret = new ArrayList<Changeset>(sel.length); 217 217 for (Object o: sel) { 218 218 ret.add((Changeset)o); -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java
r6104 r6106 290 290 panelTf.add(new JLabel(tr("I am in the timezone of: ")), gc); 291 291 292 Vector<String> vtTimezones = new Vector<String>();293 292 String[] tmp = TimeZone.getAvailableIDs(); 293 Vector<String> vtTimezones = new Vector<String>(tmp.length); 294 294 295 295 for (String tzStr : tmp) { -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java
r6093 r6106 837 837 838 838 public List<ImageEntry> getImages() { 839 List<ImageEntry> copy = new ArrayList<ImageEntry>( );839 List<ImageEntry> copy = new ArrayList<ImageEntry>(data.size()); 840 840 for (ImageEntry ie : data) { 841 841 copy.add(ie.clone()); -
trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java
r6087 r6106 1531 1531 1532 1532 public boolean put(Collection<? extends SourceEntry> entries) { 1533 Collection<Map<String, String>> setting = new ArrayList<Map<String, String>>( );1533 Collection<Map<String, String>> setting = new ArrayList<Map<String, String>>(entries.size()); 1534 1534 for (SourceEntry e : entries) { 1535 1535 setting.add(serialize(e)); -
trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java
r6070 r6106 202 202 203 203 private List<LayerDetails> parseLayers(List<Element> children, Set<String> parentCrs) { 204 List<LayerDetails> details = new ArrayList<LayerDetails>( );204 List<LayerDetails> details = new ArrayList<LayerDetails>(children.size()); 205 205 for (Element element : children) { 206 206 details.add(parseLayer(element, parentCrs));
Note:
See TracChangeset
for help on using the changeset viewer.