Changeset 6316 in josm
- Timestamp:
- 2013-10-07T20:18:17+02:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 111 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/Main.java
r6311 r6316 1047 1047 * created dataset as projection change listener. 1048 1048 */ 1049 private static final ArrayList<WeakReference<ProjectionChangeListener>> listeners = new ArrayList<WeakReference<ProjectionChangeListener>>();1049 private static final List<WeakReference<ProjectionChangeListener>> listeners = new ArrayList<WeakReference<ProjectionChangeListener>>(); 1050 1050 1051 1051 private static void fireProjectionChanged(Projection oldValue, Projection newValue, Bounds oldBounds) { … … 1127 1127 } 1128 1128 1129 private static final ArrayList<WeakReference<WindowSwitchListener>> windowSwitchListeners = new ArrayList<WeakReference<WindowSwitchListener>>();1129 private static final List<WeakReference<WindowSwitchListener>> windowSwitchListeners = new ArrayList<WeakReference<WindowSwitchListener>>(); 1130 1130 1131 1131 /** -
trunk/src/org/openstreetmap/josm/actions/AbstractInfoAction.java
r6248 r6316 9 9 import java.util.Collection; 10 10 import java.util.Iterator; 11 import java.util.List; 11 12 import java.util.regex.Pattern; 12 13 … … 117 118 118 119 protected void launchInfoBrowsersForSelectedPrimitives() { 119 ArrayList<OsmPrimitive> primitivesToShow = new ArrayList<OsmPrimitive>(getCurrentDataSet().getAllSelected());120 List<OsmPrimitive> primitivesToShow = new ArrayList<OsmPrimitive>(getCurrentDataSet().getAllSelected()); 120 121 121 122 // filter out new primitives which are not yet uploaded to the server -
trunk/src/org/openstreetmap/josm/actions/AlignInLineAction.java
r6246 r6316 32 32 public final class AlignInLineAction extends JosmAction { 33 33 34 /** 35 * Constructs a new {@code AlignInLineAction}. 36 */ 34 37 public AlignInLineAction() { 35 38 super(tr("Align Nodes in Line"), "alignline", tr("Move the selected nodes in to a line."), … … 39 42 40 43 // the joy of single return values only... 41 private void nodePairFurthestApart( ArrayList<Node> nodes, Node[] resultOut) {44 private void nodePairFurthestApart(List<Node> nodes, Node[] resultOut) { 42 45 if(resultOut.length < 2) 43 46 throw new IllegalArgumentException(); … … 107 110 List<Node> selectedNodes = new ArrayList<Node>(getCurrentDataSet().getSelectedNodes()); 108 111 Collection<Way> selectedWays = getCurrentDataSet().getSelectedWays(); 109 ArrayList<Node> nodes = new ArrayList<Node>();112 List<Node> nodes = new ArrayList<Node>(); 110 113 111 114 //// Decide what to align based on selection: -
trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java
r6156 r6316 374 374 static public class NodeGraph { 375 375 static public List<NodePair> buildNodePairs(Way way, boolean directed) { 376 ArrayList<NodePair> pairs = new ArrayList<NodePair>();376 List<NodePair> pairs = new ArrayList<NodePair>(); 377 377 for (Pair<Node,Node> pair: way.getNodePairs(false /* don't sort */)) { 378 378 pairs.add(new NodePair(pair)); … … 385 385 386 386 static public List<NodePair> buildNodePairs(List<Way> ways, boolean directed) { 387 ArrayList<NodePair> pairs = new ArrayList<NodePair>();387 List<NodePair> pairs = new ArrayList<NodePair>(); 388 388 for (Way w: ways) { 389 389 pairs.addAll(buildNodePairs(w, directed)); … … 393 393 394 394 static public List<NodePair> eliminateDuplicateNodePairs(List<NodePair> pairs) { 395 ArrayList<NodePair> cleaned = new ArrayList<NodePair>();395 List<NodePair> cleaned = new ArrayList<NodePair>(); 396 396 for(NodePair p: pairs) { 397 397 if (!cleaned.contains(p) && !cleaned.contains(p.swap())) { … … 446 446 } 447 447 } else { 448 ArrayList<NodePair> l = new ArrayList<NodePair>();448 List<NodePair> l = new ArrayList<NodePair>(); 449 449 l.add(pair); 450 450 successors.put(pair.getA(), l); … … 458 458 } 459 459 } else { 460 ArrayList<NodePair> l = new ArrayList<NodePair>();460 List<NodePair> l = new ArrayList<NodePair>(); 461 461 l.add(pair); 462 462 predecessors.put(pair.getB(), l); -
trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java
r6265 r6316 457 457 commitCommands(marktr("Added node on all intersections")); 458 458 459 ArrayList<RelationRole> relations = new ArrayList<RelationRole>();459 List<RelationRole> relations = new ArrayList<RelationRole>(); 460 460 461 461 // Remove ways from all relations so ways can be combined/split quietly … … 467 467 boolean warnAboutRelations = !relations.isEmpty() && allStartingWays.size() > 1; 468 468 469 ArrayList<WayInPolygon> preparedWays = new ArrayList<WayInPolygon>();469 List<WayInPolygon> preparedWays = new ArrayList<WayInPolygon>(); 470 470 471 471 for (Way way : outerStartingWays) { 472 ArrayList<Way> splitWays = splitWayOnNodes(way, nodes);472 List<Way> splitWays = splitWayOnNodes(way, nodes); 473 473 preparedWays.addAll(markWayInsideSide(splitWays, false)); 474 474 } 475 475 476 476 for (Way way : innerStartingWays) { 477 ArrayList<Way> splitWays = splitWayOnNodes(way, nodes);477 List<Way> splitWays = splitWayOnNodes(way, nodes); 478 478 preparedWays.addAll(markWayInsideSide(splitWays, true)); 479 479 } 480 480 481 481 // Find boundary ways 482 ArrayList<Way> discardedWays = new ArrayList<Way>();482 List<Way> discardedWays = new ArrayList<Way>(); 483 483 List<AssembledPolygon> bounadries = findBoundaryPolygons(preparedWays, discardedWays); 484 484 … … 659 659 * @return list of parts, marked with the inside orientation. 660 660 */ 661 private ArrayList<WayInPolygon> markWayInsideSide(List<Way> parts, boolean isInner) {662 663 ArrayList<WayInPolygon> result = new ArrayList<WayInPolygon>();661 private List<WayInPolygon> markWayInsideSide(List<Way> parts, boolean isInner) { 662 663 List<WayInPolygon> result = new ArrayList<WayInPolygon>(); 664 664 665 665 //prepare prev and next maps … … 829 829 * @return list of split ways (or original ways if no splitting is done). 830 830 */ 831 private ArrayList<Way> splitWayOnNodes(Way way, Set<Node> nodes) {832 833 ArrayList<Way> result = new ArrayList<Way>();831 private List<Way> splitWayOnNodes(Way way, Set<Node> nodes) { 832 833 List<Way> result = new ArrayList<Way>(); 834 834 List<List<Node>> chunks = buildNodeChunks(way, nodes); 835 835 … … 1344 1344 * @return List of relations with roles the primitives was part of 1345 1345 */ 1346 private ArrayList<RelationRole> removeFromAllRelations(OsmPrimitive osm) {1347 ArrayList<RelationRole> result = new ArrayList<RelationRole>();1346 private List<RelationRole> removeFromAllRelations(OsmPrimitive osm) { 1347 List<RelationRole> result = new ArrayList<RelationRole>(); 1348 1348 1349 1349 for (Relation r : Main.main.getCurrentDataSet().getRelations()) { … … 1383 1383 * @param relationsToDelete set of relations to delete. 1384 1384 */ 1385 private void fixRelations( ArrayList<RelationRole> rels, Way outer, RelationRole ownMultipol, Set<Relation> relationsToDelete) {1386 ArrayList<RelationRole> multiouters = new ArrayList<RelationRole>();1387 1388 if (ownMultipol != null) {1385 private void fixRelations(List<RelationRole> rels, Way outer, RelationRole ownMultipol, Set<Relation> relationsToDelete) { 1386 List<RelationRole> multiouters = new ArrayList<RelationRole>(); 1387 1388 if (ownMultipol != null) { 1389 1389 multiouters.add(ownMultipol); 1390 1390 } -
trunk/src/org/openstreetmap/josm/actions/MapRectifierWMSmenuAction.java
r6246 r6316 9 9 import java.awt.event.KeyEvent; 10 10 import java.util.ArrayList; 11 import java.util.List; 11 12 import java.util.regex.Matcher; 12 13 import java.util.regex.Pattern; … … 63 64 * List of available rectifier services. May be extended from the outside 64 65 */ 65 public ArrayList<RectifierService> services = new ArrayList<RectifierService>();66 public List<RectifierService> services = new ArrayList<RectifierService>(); 66 67 67 68 public MapRectifierWMSmenuAction() { -
trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java
r6275 r6316 198 198 199 199 for (Way w: OsmPrimitive.getFilteredList(OsmPrimitive.getReferrer(nodesToDelete), Way.class)) { 200 ArrayList<Node> newNodes = new ArrayList<Node>(w.getNodesCount());200 List<Node> newNodes = new ArrayList<Node>(w.getNodesCount()); 201 201 for (Node n: w.getNodes()) { 202 202 if (! nodesToDelete.contains(n) && n != targetNode) { -
trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java
r6296 r6316 44 44 "You can add two nodes to the selection. Then, the direction is fixed by these two reference nodes. "+ 45 45 "(Afterwards, you can undo the movement for certain nodes:<br>"+ 46 "Select them and press the shortcut for Orthogonalize / Undo. The default is Shift-Q.)");46 "Select them and press the shortcut for Orthogonalize / Undo. The default is Shift-Q.)"); 47 47 48 48 /** … … 144 144 } 145 145 146 final ArrayList<Node> nodeList = new ArrayList<Node>();147 final ArrayList<WayData> wayDataList = new ArrayList<WayData>();146 final List<Node> nodeList = new ArrayList<Node>(); 147 final List<WayData> wayDataList = new ArrayList<WayData>(); 148 148 final Collection<OsmPrimitive> sel = getCurrentDataSet().getSelected(); 149 149 … … 170 170 } 171 171 else if (nodeList.isEmpty()) { 172 List< ArrayList<WayData>> groups = buildGroups(wayDataList);173 for ( ArrayList<WayData> g: groups) {172 List<List<WayData>> groups = buildGroups(wayDataList); 173 for (List<WayData> g: groups) { 174 174 commands.addAll(orthogonalize(g, nodeList)); 175 175 } … … 200 200 * Collect groups of ways with common nodes in order to orthogonalize each group separately. 201 201 */ 202 private static List< ArrayList<WayData>> buildGroups(ArrayList<WayData> wayDataList) {203 List< ArrayList<WayData>> groups = new ArrayList<ArrayList<WayData>>();202 private static List<List<WayData>> buildGroups(List<WayData> wayDataList) { 203 List<List<WayData>> groups = new ArrayList<List<WayData>>(); 204 204 Set<WayData> remaining = new HashSet<WayData>(wayDataList); 205 205 while (!remaining.isEmpty()) { 206 ArrayList<WayData> group = new ArrayList<WayData>();206 List<WayData> group = new ArrayList<WayData>(); 207 207 groups.add(group); 208 208 Iterator<WayData> it = remaining.iterator(); … … 247 247 * 248 248 **/ 249 private static Collection<Command> orthogonalize(ArrayList<WayData> wayDataList, ArrayList<Node> headingNodes) 250 throws InvalidUserInputException 251 { 249 private static Collection<Command> orthogonalize(List<WayData> wayDataList, List<Node> headingNodes) throws InvalidUserInputException { 252 250 // find average heading 253 251 double headingAll; -
trunk/src/org/openstreetmap/josm/actions/UnGlueAction.java
r6289 r6316 297 297 cmds.add(new AddCommand(newNode)); 298 298 299 ArrayList<Node> nn = new ArrayList<Node>();299 List<Node> nn = new ArrayList<Node>(); 300 300 for (Node pushNode : w.getNodes()) { 301 301 if (originalNode == pushNode) { -
trunk/src/org/openstreetmap/josm/actions/UploadAction.java
r6084 r6316 8 8 import java.awt.event.KeyEvent; 9 9 import java.util.LinkedList; 10 import java.util.List; 10 11 11 12 import javax.swing.JOptionPane; … … 51 52 * however, a plugin might also want to insert something after that. 52 53 */ 53 private static final Li nkedList<UploadHook> uploadHooks = new LinkedList<UploadHook>();54 private static final Li nkedList<UploadHook> lateUploadHooks = new LinkedList<UploadHook>();54 private static final List<UploadHook> uploadHooks = new LinkedList<UploadHook>(); 55 private static final List<UploadHook> lateUploadHooks = new LinkedList<UploadHook>(); 55 56 static { 56 57 /** -
trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadTaskList.java
r6069 r6316 141 141 */ 142 142 protected void updatePotentiallyDeletedPrimitives(Set<OsmPrimitive> potentiallyDeleted) { 143 final ArrayList<OsmPrimitive> toSelect = new ArrayList<OsmPrimitive>();143 final List<OsmPrimitive> toSelect = new ArrayList<OsmPrimitive>(); 144 144 for (OsmPrimitive primitive : potentiallyDeleted) { 145 145 if (primitive != null) { -
trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
r6310 r6316 424 424 Collection<OsmPrimitive> newSelection = new LinkedList<OsmPrimitive>(ds.getSelected()); 425 425 426 ArrayList<Way> reuseWays = new ArrayList<Way>(),426 List<Way> reuseWays = new ArrayList<Way>(), 427 427 replacedWays = new ArrayList<Way>(); 428 428 boolean newNode = false; … … 652 652 } 653 653 654 private void insertNodeIntoAllNearbySegments(List<WaySegment> wss, Node n, Collection<OsmPrimitive> newSelection, Collection<Command> cmds, ArrayList<Way> replacedWays, ArrayList<Way> reuseWays) {654 private void insertNodeIntoAllNearbySegments(List<WaySegment> wss, Node n, Collection<OsmPrimitive> newSelection, Collection<Command> cmds, List<Way> replacedWays, List<Way> reuseWays) { 655 655 Map<Way, List<Integer>> insertPoints = new HashMap<Way, List<Integer>>(); 656 656 for (WaySegment ws : wss) { -
trunk/src/org/openstreetmap/josm/actions/mapmode/ImproveWayAccuracyAction.java
r6310 r6316 613 613 */ 614 614 private void updateStateByCurrentSelection() { 615 final ArrayList<Node> nodeList = new ArrayList<Node>();616 final ArrayList<Way> wayList = new ArrayList<Way>();615 final List<Node> nodeList = new ArrayList<Node>(); 616 final List<Way> wayList = new ArrayList<Way>(); 617 617 final Collection<OsmPrimitive> sel = getCurrentDataSet().getSelected(); 618 618 -
trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWayAction.java
r6310 r6316 3 3 4 4 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 import static org.openstreetmap.josm.tools.I18n.marktr; 5 6 import static org.openstreetmap.josm.tools.I18n.tr; 6 7 … … 18 19 import java.util.Collection; 19 20 import java.util.LinkedHashSet; 21 import java.util.Set; 20 22 21 23 import javax.swing.JOptionPane; … … 40 42 import org.openstreetmap.josm.gui.util.GuiHelper; 41 43 import org.openstreetmap.josm.tools.Geometry; 42 import static org.openstreetmap.josm.tools.I18n.marktr;43 44 import org.openstreetmap.josm.tools.ImageProvider; 44 45 import org.openstreetmap.josm.tools.Shortcut; … … 122 123 private WaySegment referenceSegment; 123 124 private ParallelWays pWays; 124 private LinkedHashSet<Way> sourceWays;125 private Set<Way> sourceWays; 125 126 private EastNorth helperLineStart; 126 127 private EastNorth helperLineEnd; -
trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWays.java
r6069 r6316 178 178 179 179 private List<Command> makeAddWayAndNodesCommandList() { 180 ArrayList<Command> commands = new ArrayList<Command>(sortedNodes.size() + ways.size());180 List<Command> commands = new ArrayList<Command>(sortedNodes.size() + ways.size()); 181 181 for (int i = 0; i < sortedNodes.size() - (isClosedPath() ? 1 : 0); i++) { 182 182 commands.add(new AddCommand(sortedNodes.get(i))); -
trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java
r6248 r6316 111 111 112 112 public static List<String> getSearchExpressionHistory() { 113 ArrayList<String> ret = new ArrayList<String>(getSearchHistory().size());113 List<String> ret = new ArrayList<String>(getSearchHistory().size()); 114 114 for (SearchSetting ss: getSearchHistory()) { 115 115 ret.add(ss.text); … … 120 120 private static SearchSetting lastSearch = null; 121 121 122 /** 123 * Constructs a new {@code SearchAction}. 124 */ 122 125 public SearchAction() { 123 126 super(tr("Search..."), "dialogs/search", tr("Search for objects."), -
trunk/src/org/openstreetmap/josm/command/RemoveNodesCommand.java
r6253 r6316 7 7 import java.util.HashSet; 8 8 import java.util.List; 9 import java.util.Set; 10 9 11 import javax.swing.Icon; 10 12 … … 26 28 27 29 private final Way way; 28 private final HashSet<Node> rmNodes;30 private final Set<Node> rmNodes; 29 31 30 32 public RemoveNodesCommand(Way way, List<Node> rmNodes) { -
trunk/src/org/openstreetmap/josm/corrector/ReverseWayTagCorrector.java
r6069 r6316 196 196 new HashMap<OsmPrimitive, List<TagCorrection>>(); 197 197 198 ArrayList<TagCorrection> tagCorrections = new ArrayList<TagCorrection>();198 List<TagCorrection> tagCorrections = new ArrayList<TagCorrection>(); 199 199 for (String key : way.keySet()) { 200 200 String value = way.get(key); … … 221 221 Map<OsmPrimitive, List<RoleCorrection>> roleCorrectionMap = 222 222 new HashMap<OsmPrimitive, List<RoleCorrection>>(); 223 ArrayList<RoleCorrection> roleCorrections = new ArrayList<RoleCorrection>();223 List<RoleCorrection> roleCorrections = new ArrayList<RoleCorrection>(); 224 224 225 225 Collection<OsmPrimitive> referrers = oldway.getReferrers(); -
trunk/src/org/openstreetmap/josm/data/APIDataSet.java
r6084 r6316 333 333 visit(path, relation); 334 334 } 335 ArrayList<Relation> ret = new ArrayList<Relation>(relations);335 List<Relation> ret = new ArrayList<Relation>(relations); 336 336 Collections.sort( 337 337 ret, -
trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java
r6313 r6316 206 206 */ 207 207 public static void exportPreferencesKeysByPatternToFile(String fileName, boolean append, String pattern) { 208 ArrayList<String> keySet = new ArrayList<String>();208 List<String> keySet = new ArrayList<String>(); 209 209 Map<String, Setting> allSettings = Main.pref.getAllSettings(); 210 210 for (String key: allSettings.keySet()) { … … 750 750 // "lists" 751 751 for (Entry<String, List<List<String>>> entry : fragment.arrayProperties.entrySet()) { 752 ArrayList<Collection<String>> array = new ArrayList<Collection<String>>();752 List<Collection<String>> array = new ArrayList<Collection<String>>(); 753 753 array.addAll(entry.getValue()); 754 754 mainpref.putArray(entry.getKey(), array); -
trunk/src/org/openstreetmap/josm/data/imagery/ImageryLayerInfo.java
r6310 r6316 22 22 23 23 public static final ImageryLayerInfo instance = new ImageryLayerInfo(); 24 ArrayList<ImageryInfo> layers = new ArrayList<ImageryInfo>();25 static ArrayList<ImageryInfo> defaultLayers = new ArrayList<ImageryInfo>();24 List<ImageryInfo> layers = new ArrayList<ImageryInfo>(); 25 static List<ImageryInfo> defaultLayers = new ArrayList<ImageryInfo>(); 26 26 27 27 private final static String[] DEFAULT_LAYER_SITES = { … … 92 92 93 93 Collection<String> defaults = Main.pref.getCollection("imagery.layers.default"); 94 ArrayList<String> defaultsSave = new ArrayList<String>();94 List<String> defaultsSave = new ArrayList<String>(); 95 95 for (ImageryInfo def : defaultLayers) { 96 96 if (def.isDefaultEntry()) { -
trunk/src/org/openstreetmap/josm/data/imagery/OffsetBookmark.java
r6248 r6316 45 45 46 46 public OffsetBookmark(Collection<String> list) { 47 ArrayList<String> array = new ArrayList<String>(list);47 List<String> array = new ArrayList<String>(list); 48 48 this.projectionCode = array.get(0); 49 49 this.layerName = array.get(1); … … 60 60 } 61 61 62 public ArrayList<String> getInfoArray() {63 ArrayList<String> res = new ArrayList<String>(7);62 public List<String> getInfoArray() { 63 List<String> res = new ArrayList<String>(7); 64 64 if (projectionCode != null) { 65 65 res.add(projectionCode); -
trunk/src/org/openstreetmap/josm/data/osm/DataSetMerger.java
r6296 r6316 402 402 targetDataSet.beginUpdate(); 403 403 try { 404 ArrayList<? extends OsmPrimitive> candidates = new ArrayList<Node>(targetDataSet.getNodes());404 List<? extends OsmPrimitive> candidates = new ArrayList<Node>(targetDataSet.getNodes()); 405 405 for (Node node: sourceDataSet.getNodes()) { 406 406 mergePrimitive(node, candidates); -
trunk/src/org/openstreetmap/josm/data/osm/OsmUtils.java
r3083 r6316 4 4 import java.util.ArrayList; 5 5 import java.util.Arrays; 6 import java.util.List; 6 7 import java.util.Locale; 7 8 8 9 public class OsmUtils { 9 10 10 static ArrayList<String> TRUE_VALUES = new ArrayList<String>(Arrays11 static List<String> TRUE_VALUES = new ArrayList<String>(Arrays 11 12 .asList(new String[] { "true", "yes", "1", "on" })); 12 static ArrayList<String> FALSE_VALUES = new ArrayList<String>(Arrays13 static List<String> FALSE_VALUES = new ArrayList<String>(Arrays 13 14 .asList(new String[] { "false", "no", "0", "off" })); 14 static ArrayList<String> REVERSE_VALUES = new ArrayList<String>(Arrays15 static List<String> REVERSE_VALUES = new ArrayList<String>(Arrays 15 16 .asList(new String[] { "reverse", "-1" })); 16 17 -
trunk/src/org/openstreetmap/josm/data/osm/Relation.java
r6140 r6316 367 367 boolean locked = writeLock(); 368 368 try { 369 ArrayList<RelationMember> todelete = new ArrayList<RelationMember>();369 List<RelationMember> todelete = new ArrayList<RelationMember>(); 370 370 for (RelationMember member: members) { 371 371 if (primitives.contains(member.getMember())) { -
trunk/src/org/openstreetmap/josm/data/osm/User.java
r6223 r6316 136 136 * @return list of names 137 137 */ 138 public ArrayList<String> getNames() {138 public List<String> getNames() { 139 139 return new ArrayList<String>(names); 140 140 } -
trunk/src/org/openstreetmap/josm/data/osm/history/History.java
r6264 r6316 25 25 26 26 private static History filter(History history, FilterPredicate predicate) { 27 ArrayList<HistoryOsmPrimitive> out = new ArrayList<HistoryOsmPrimitive>();27 List<HistoryOsmPrimitive> out = new ArrayList<HistoryOsmPrimitive>(); 28 28 for (HistoryOsmPrimitive primitive: history.versions) { 29 29 if (predicate.matches(primitive)) { … … 35 35 36 36 /** the list of object snapshots */ 37 private ArrayList<HistoryOsmPrimitive> versions;37 private List<HistoryOsmPrimitive> versions; 38 38 /** the object id */ 39 39 private final long id; … … 63 63 64 64 public History sortAscending() { 65 ArrayList<HistoryOsmPrimitive> copy = new ArrayList<HistoryOsmPrimitive>(versions);65 List<HistoryOsmPrimitive> copy = new ArrayList<HistoryOsmPrimitive>(versions); 66 66 Collections.sort( 67 67 copy, … … 77 77 78 78 public History sortDescending() { 79 ArrayList<HistoryOsmPrimitive> copy = new ArrayList<HistoryOsmPrimitive>(versions);79 List<HistoryOsmPrimitive> copy = new ArrayList<HistoryOsmPrimitive>(versions); 80 80 Collections.sort( 81 81 copy, -
trunk/src/org/openstreetmap/josm/data/osm/history/HistoryDataSet.java
r6084 r6316 5 5 import java.util.ArrayList; 6 6 import java.util.HashMap; 7 import java.util.List; 7 8 import java.util.concurrent.CopyOnWriteArrayList; 8 9 … … 87 88 88 89 SimplePrimitiveId pid = new SimplePrimitiveId(id, type); 89 ArrayList<HistoryOsmPrimitive> versions = data.get(pid);90 List<HistoryOsmPrimitive> versions = data.get(pid); 90 91 if (versions == null) 91 92 return null; … … 141 142 public History getHistory(PrimitiveId pid) throws IllegalArgumentException{ 142 143 CheckParameterUtil.ensureParameterNotNull(pid, "pid"); 143 ArrayList<HistoryOsmPrimitive> versions = data.get(pid);144 List<HistoryOsmPrimitive> versions = data.get(pid); 144 145 if (versions == null) 145 146 return null; -
trunk/src/org/openstreetmap/josm/data/osm/history/HistoryRelation.java
r5440 r6316 21 21 public class HistoryRelation extends HistoryOsmPrimitive{ 22 22 23 private ArrayList<RelationMemberData> members = new ArrayList<RelationMemberData>();23 private List<RelationMemberData> members = new ArrayList<RelationMemberData>(); 24 24 25 25 /** -
trunk/src/org/openstreetmap/josm/data/osm/history/HistoryWay.java
r6069 r6316 21 21 public class HistoryWay extends HistoryOsmPrimitive { 22 22 23 private ArrayList<Long> nodeIds = new ArrayList<Long>();23 private List<Long> nodeIds = new ArrayList<Long>(); 24 24 25 25 /** -
trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2GridShiftFile.java
r6267 r6316 25 25 import java.util.ArrayList; 26 26 import java.util.HashMap; 27 import java.util.List; 27 28 28 29 import org.openstreetmap.josm.tools.Utils; … … 166 167 private NTV2SubGrid[] createSubGridTree(NTV2SubGrid[] subGrid) { 167 168 int topLevelCount = 0; 168 HashMap<String, ArrayList<NTV2SubGrid>> subGridMap = new HashMap<String, ArrayList<NTV2SubGrid>>();169 HashMap<String, List<NTV2SubGrid>> subGridMap = new HashMap<String, List<NTV2SubGrid>>(); 169 170 for (int i = 0; i < subGrid.length; i++) { 170 171 if (subGrid[i].getParentSubGridName().equalsIgnoreCase("NONE")) { … … 179 180 topLevelSubGrid[topLevelCount++] = subGrid[i]; 180 181 } else { 181 ArrayList<NTV2SubGrid> parent = subGridMap.get(subGrid[i].getParentSubGridName());182 List<NTV2SubGrid> parent = subGridMap.get(subGrid[i].getParentSubGridName()); 182 183 parent.add(subGrid[i]); 183 184 } … … 185 186 NTV2SubGrid[] nullArray = new NTV2SubGrid[0]; 186 187 for (int i = 0; i < subGrid.length; i++) { 187 ArrayList<NTV2SubGrid> subSubGrids = subGridMap.get(subGrid[i].getSubGridName());188 List<NTV2SubGrid> subSubGrids = subGridMap.get(subGrid[i].getSubGridName()); 188 189 if (!subSubGrids.isEmpty()) { 189 190 NTV2SubGrid[] subGridArray = subSubGrids.toArray(nullArray); -
trunk/src/org/openstreetmap/josm/data/validation/tests/TurnrestrictionTest.java
r6241 r6316 66 66 return; 67 67 68 ArrayList<OsmPrimitive> l = new ArrayList<OsmPrimitive>();68 List<OsmPrimitive> l = new ArrayList<OsmPrimitive>(); 69 69 l.add(r); 70 70 l.add(m.getMember()); -
trunk/src/org/openstreetmap/josm/gui/BookmarkList.java
r6248 r6316 15 15 import java.util.Collections; 16 16 import java.util.LinkedList; 17 import java.util.List; 17 18 import java.util.regex.Matcher; 18 19 import java.util.regex.Pattern; … … 46 47 47 48 public Bookmark(Collection<String> list) throws NumberFormatException, IllegalArgumentException { 48 ArrayList<String> array = new ArrayList<String>(list);49 List<String> array = new ArrayList<String>(list); 49 50 if(array.size() < 5) 50 51 throw new IllegalArgumentException(tr("Wrong number of arguments for bookmark")); -
trunk/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java
r6084 r6316 49 49 static private DefaultNameFormatter instance; 50 50 51 private static final Li nkedList<NameFormatterHook> formatHooks = new LinkedList<NameFormatterHook>();51 private static final List<NameFormatterHook> formatHooks = new LinkedList<NameFormatterHook>(); 52 52 53 53 /** … … 507 507 .append(primitive.getId()) 508 508 .append("<br>"); 509 ArrayList<String> keyList = new ArrayList<String>(primitive.keySet());509 List<String> keyList = new ArrayList<String>(primitive.keySet()); 510 510 Collections.sort(keyList); 511 511 for (int i = 0; i < keyList.size(); i++) { … … 680 680 .append(primitive.getId()) 681 681 .append("<br>"); 682 ArrayList<String> keyList = new ArrayList<String>(primitive.getTags().keySet());682 List<String> keyList = new ArrayList<String>(primitive.getTags().keySet()); 683 683 Collections.sort(keyList); 684 684 for (int i = 0; i < keyList.size(); i++) { -
trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java
r6310 r6316 104 104 // For easy access when inherited 105 105 protected Insets contentInsets = new Insets(10,5,0,5); 106 protected ArrayList<JButton> buttons = new ArrayList<JButton>();106 protected List<JButton> buttons = new ArrayList<JButton>(); 107 107 108 108 /** -
trunk/src/org/openstreetmap/josm/gui/MainApplet.java
r6084 r6316 38 38 39 39 public static final class UploadPreferencesAction extends JosmAction { 40 /** 41 * Constructs a new {@code UploadPreferencesAction}. 42 */ 40 43 public UploadPreferencesAction() { 41 44 super(tr("Upload Preferences"), "upload-preferences", tr("Upload the current preferences to the server"), -
trunk/src/org/openstreetmap/josm/gui/MapView.java
r6203 r6316 210 210 public MouseEvent lastMEvent = new MouseEvent(this, 0, 0, 0, 0, 0, 0, false); // In case somebody reads it before first mouse move 211 211 212 private final Li nkedList<MapViewPaintable> temporaryLayers = new LinkedList<MapViewPaintable>();212 private final List<MapViewPaintable> temporaryLayers = new LinkedList<MapViewPaintable>(); 213 213 214 214 private BufferedImage nonChangedLayersBuffer; … … 500 500 */ 501 501 protected List<Layer> getVisibleLayersInZOrder() { 502 ArrayList<Layer> ret = new ArrayList<Layer>();502 List<Layer> ret = new ArrayList<Layer>(); 503 503 for (Layer l: layers) { 504 504 if (l.isVisible()) { … … 734 734 */ 735 735 public <T> List<T> getLayersOfType(Class<T> ofType) { 736 ArrayList<T> ret = new ArrayList<T>();736 List<T> ret = new ArrayList<T>(); 737 737 for (Layer layer : getAllLayersAsList()) { 738 738 if (ofType.isInstance(layer)) { -
trunk/src/org/openstreetmap/josm/gui/actionsupport/DeleteFromRelationConfirmationDialog.java
r6084 r6316 17 17 import java.util.Comparator; 18 18 import java.util.HashSet; 19 import java.util.List; 19 20 import java.util.Set; 20 21 … … 186 187 */ 187 188 public static class RelationMemberTableModel extends DefaultTableModel { 188 private ArrayList<RelationToChildReference> data;189 private List<RelationToChildReference> data; 189 190 190 191 /** -
trunk/src/org/openstreetmap/josm/gui/bbox/SlippyMapBBoxChooser.java
r6246 r6316 17 17 import java.util.HashSet; 18 18 import java.util.List; 19 import java.util.Set; 19 20 import java.util.concurrent.CopyOnWriteArrayList; 20 21 … … 100 101 */ 101 102 public static class TMSTileSourceProvider implements TileSourceProvider { 102 static final HashSet<String> existingSlippyMapUrls = new HashSet<String>();103 static final Set<String> existingSlippyMapUrls = new HashSet<String>(); 103 104 static { 104 105 // Urls that already exist in the slippymap chooser and shouldn't be copied from TMS layer list -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/ConflictResolver.java
r6084 r6316 276 276 */ 277 277 public Command buildResolveCommand() { 278 ArrayList<Command> commands = new ArrayList<Command>();278 List<Command> commands = new ArrayList<Command>(); 279 279 280 280 if (tagMerger.getModel().getNumResolvedConflicts() > 0) { -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMergeModel.java
r6248 r6316 74 74 private static final int MAX_DELETED_PRIMITIVE_IN_DIALOG = 5; 75 75 76 protected HashMap<ListRole, ArrayList<T>> entries;76 protected Map<ListRole, ArrayList<T>> entries; 77 77 78 78 protected EntriesTableModel myEntriesTableModel; … … 693 693 } 694 694 695 protected ArrayList<T> getEntries() {695 protected List<T> getEntries() { 696 696 return entries.get(role); 697 697 } … … 702 702 * @return the opposite list of entries 703 703 */ 704 protected ArrayList<T> getOppositeEntries() {704 protected List<T> getOppositeEntries() { 705 705 ListRole opposite = getComparePairListModel().getSelectedComparePair().getOppositeRole(role); 706 706 return entries.get(opposite); … … 738 738 */ 739 739 protected class EntriesSelectionModel extends DefaultListSelectionModel { 740 private final ArrayList<T> entries;740 private final List<T> entries; 741 741 742 742 public EntriesSelectionModel(ArrayList<T> nodes) { -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListTableCellRenderer.java
r6084 r6316 6 6 import java.util.ArrayList; 7 7 import java.util.Collections; 8 import java.util.List; 8 9 9 10 import javax.swing.BorderFactory; … … 58 59 // show the key/value-pairs, sorted by key 59 60 // 60 ArrayList<String> keyList = new ArrayList<String>(primitive.keySet());61 List<String> keyList = new ArrayList<String>(primitive.keySet()); 61 62 Collections.sort(keyList); 62 63 for (int i = 0; i < keyList.size(); i++) { -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberTableCellRenderer.java
r6084 r6316 6 6 import java.util.ArrayList; 7 7 import java.util.Collections; 8 import java.util.List; 8 9 9 10 import javax.swing.BorderFactory; … … 43 44 .append(primitive.getId()) 44 45 .append("<br>"); 45 ArrayList<String> keyList = new ArrayList<String>(primitive.keySet());46 List<String> keyList = new ArrayList<String>(primitive.keySet()); 46 47 Collections.sort(keyList); 47 48 for (int i = 0; i < keyList.size(); i++) { -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMerger.java
r6267 r6316 14 14 import java.awt.event.MouseEvent; 15 15 import java.util.ArrayList; 16 import java.util.List; 16 17 17 18 import javax.swing.AbstractAction; … … 333 334 */ 334 335 static class AdjustmentSynchronizer implements AdjustmentListener { 335 private final ArrayList<Adjustable> synchronizedAdjustables;336 private final List<Adjustable> synchronizedAdjustables; 336 337 337 338 public AdjustmentSynchronizer() { -
trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueResolutionDecision.java
r5266 r6316 148 148 */ 149 149 public List<String> getValues() { 150 ArrayList<String> ret = new ArrayList<String>(tags.getValues());150 List<String> ret = new ArrayList<String>(tags.getValues()); 151 151 ret.remove(""); 152 152 ret.remove(null); -
trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolverModel.java
r6084 r6316 10 10 import java.util.HashSet; 11 11 import java.util.List; 12 import java.util.Map; 12 13 import java.util.Set; 13 14 … … 24 25 private List<String> displayedKeys; 25 26 private Set<String> keysWithConflicts; 26 private HashMap<String, MultiValueResolutionDecision> decisions;27 private Map<String, MultiValueResolutionDecision> decisions; 27 28 private int numConflicts; 28 29 private PropertyChangeSupport support; … … 30 31 private boolean showTagsWithMultiValuesOnly = false; 31 32 33 /** 34 * Constructs a new {@code TagConflictResolverModel}. 35 */ 32 36 public TagConflictResolverModel() { 33 37 numConflicts = 0; -
trunk/src/org/openstreetmap/josm/gui/dialogs/HistoryDialog.java
r6084 r6316 62 62 protected ReloadAction reloadAction; 63 63 64 /** 65 * Constructs a new {@code HistoryDialog}. 66 */ 64 67 public HistoryDialog() { 65 68 super(tr("History"), "history", tr("Display the history of all selected items."), … … 149 152 */ 150 153 static class HistoryItemTableModel extends DefaultTableModel implements SelectionChangedListener{ 151 private ArrayList<OsmPrimitive> data;154 private List<OsmPrimitive> data; 152 155 private DefaultListSelectionModel selectionModel; 153 156 … … 175 178 176 179 protected List<OsmPrimitive> getSelectedPrimitives() { 177 ArrayList<OsmPrimitive> ret = new ArrayList<OsmPrimitive>();180 List<OsmPrimitive> ret = new ArrayList<OsmPrimitive>(); 178 181 for (int i=0; i< data.size(); i++) { 179 182 if (selectionModel.isSelectedIndex(i)) { … … 227 230 public List<OsmPrimitive> getPrimitives(int [] rows) { 228 231 if (rows == null || rows.length == 0) return Collections.emptyList(); 229 ArrayList<OsmPrimitive> ret = new ArrayList<OsmPrimitive>(rows.length);232 List<OsmPrimitive> ret = new ArrayList<OsmPrimitive>(rows.length); 230 233 for (int row: rows) { 231 234 ret.add(data.get(row)); -
trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java
r6270 r6316 1205 1205 */ 1206 1206 public List<Layer> getSelectedLayers() { 1207 ArrayList<Layer> selected = new ArrayList<Layer>();1207 List<Layer> selected = new ArrayList<Layer>(); 1208 1208 for (int i=0; i<getLayers().size(); i++) { 1209 1209 if (selectionModel.isSelectedIndex(i)) { … … 1222 1222 */ 1223 1223 public List<Integer> getSelectedRows() { 1224 ArrayList<Integer> selected = new ArrayList<Integer>();1224 List<Integer> selected = new ArrayList<Integer>(); 1225 1225 for (int i=0; i<getLayers().size();i++) { 1226 1226 if (selectionModel.isSelectedIndex(i)) { … … 1382 1382 */ 1383 1383 public List<Layer> getPossibleMergeTargets(Layer source) { 1384 ArrayList<Layer> targets = new ArrayList<Layer>();1384 List<Layer> targets = new ArrayList<Layer>(); 1385 1385 if (source == null) 1386 1386 return targets; -
trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java
r6296 r6316 382 382 */ 383 383 private class RelationListModel extends AbstractListModel { 384 private final ArrayList<Relation> relations = new ArrayList<Relation>();385 private ArrayList<Relation> filteredRelations;384 private final List<Relation> relations = new ArrayList<Relation>(); 385 private List<Relation> filteredRelations; 386 386 private DefaultListSelectionModel selectionModel; 387 387 private SearchCompiler.Match filter; … … 538 538 */ 539 539 public List<Relation> getSelectedRelations() { 540 ArrayList<Relation> ret = new ArrayList<Relation>();540 List<Relation> ret = new ArrayList<Relation>(); 541 541 for (int i=0; i<getSize();i++) { 542 542 if (!selectionModel.isSelectedIndex(i)) { -
trunk/src/org/openstreetmap/josm/gui/dialogs/UserListDialog.java
r6248 r6316 290 290 */ 291 291 static class UserTableModel extends DefaultTableModel { 292 private ArrayList<UserInfo> data;292 private List<UserInfo> data; 293 293 294 294 public UserTableModel() { -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManagerModel.java
r5958 r6316 76 76 */ 77 77 public List<Changeset> getSelectedChangesets() { 78 ArrayList<Changeset> ret = new ArrayList<Changeset>();78 List<Changeset> ret = new ArrayList<Changeset>(); 79 79 for (int i =0; i< data.size();i++) { 80 80 Changeset cs = data.get(i); -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentPanel.java
r6267 r6316 230 230 231 231 protected List<HistoryOsmPrimitive> filterPrimitivesWithUnloadedHistory(Collection<HistoryOsmPrimitive> primitives) { 232 ArrayList<HistoryOsmPrimitive> ret = new ArrayList<HistoryOsmPrimitive>(primitives.size());232 List<HistoryOsmPrimitive> ret = new ArrayList<HistoryOsmPrimitive>(primitives.size()); 233 233 for (HistoryOsmPrimitive p: primitives) { 234 234 if (HistoryDataSet.getInstance().getHistory(p.getPrimitiveId()) == null) { -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentTableModel.java
r6084 r6316 7 7 import java.util.HashSet; 8 8 import java.util.Iterator; 9 import java.util.List; 9 10 import java.util.Set; 10 11 … … 23 24 public class ChangesetContentTableModel extends AbstractTableModel { 24 25 25 private final ArrayList<ChangesetContentEntry> data = new ArrayList<ChangesetContentEntry>();26 private final List<ChangesetContentEntry> data = new ArrayList<ChangesetContentEntry>(); 26 27 private DefaultListSelectionModel selectionModel; 27 28 -
trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java
r6310 r6316 376 376 commands.add(new ChangePropertyCommand(sel, key, null)); 377 377 if (value.equals(tr("<different>"))) { 378 Map<String, ArrayList<OsmPrimitive>> map = new HashMap<String, ArrayList<OsmPrimitive>>();378 Map<String, List<OsmPrimitive>> map = new HashMap<String, List<OsmPrimitive>>(); 379 379 for (OsmPrimitive osm: sel) { 380 380 String val = osm.get(key); … … 383 383 map.get(val).add(osm); 384 384 } else { 385 ArrayList<OsmPrimitive> v = new ArrayList<OsmPrimitive>();385 List<OsmPrimitive> v = new ArrayList<OsmPrimitive>(); 386 386 v.add(osm); 387 387 map.put(val, v); … … 389 389 } 390 390 } 391 for (Map.Entry<String, ArrayList<OsmPrimitive>> e: map.entrySet()) {391 for (Map.Entry<String, List<OsmPrimitive>> e: map.entrySet()) { 392 392 commands.add(new ChangePropertyCommand(e.getValue(), newkey, e.getKey())); 393 393 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java
r6296 r6316 648 648 */ 649 649 protected void cleanSelfReferences() { 650 ArrayList<OsmPrimitive> toCheck = new ArrayList<OsmPrimitive>();650 List<OsmPrimitive> toCheck = new ArrayList<OsmPrimitive>(); 651 651 toCheck.add(getRelation()); 652 652 if (memberTableModel.hasMembersReferringTo(toCheck)) { … … 769 769 if (primitives == null || primitives.isEmpty()) 770 770 return primitives; 771 ArrayList<OsmPrimitive> ret = new ArrayList<OsmPrimitive>();771 List<OsmPrimitive> ret = new ArrayList<OsmPrimitive>(); 772 772 for (OsmPrimitive primitive : primitives) { 773 773 if (primitive instanceof Relation && getRelation() != null && getRelation().equals(primitive)) { -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTable.java
r6070 r6316 12 12 import java.util.Arrays; 13 13 import java.util.Collection; 14 import java.util.List; 14 15 15 16 import javax.swing.AbstractAction; … … 124 125 if (Main.isDisplayingMapView()) { 125 126 Collection<RelationMember> sel = getMemberTableModel().getSelectedMembers(); 126 final ArrayList<OsmPrimitive> toHighlight = new ArrayList<OsmPrimitive>();127 final List<OsmPrimitive> toHighlight = new ArrayList<OsmPrimitive>(); 127 128 for (RelationMember r: sel) { 128 129 if (r.getMember().isUsable()) { -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableModel.java
r6296 r6316 387 387 388 388 protected List<Integer> getSelectedIndices() { 389 ArrayList<Integer> selectedIndices = new ArrayList<Integer>();389 List<Integer> selectedIndices = new ArrayList<Integer>(); 390 390 for (int i = 0; i < members.size(); i++) { 391 391 if (getSelectionModel().isSelectedIndex(i)) { … … 471 471 */ 472 472 public Collection<RelationMember> getSelectedMembers() { 473 ArrayList<RelationMember> selectedMembers = new ArrayList<RelationMember>();473 List<RelationMember> selectedMembers = new ArrayList<RelationMember>(); 474 474 for (int i : getSelectedIndices()) { 475 475 selectedMembers.add(members.get(i)); … … 721 721 Collections.reverse(selectedIndicesReversed); 722 722 723 ArrayList<RelationMember> newMembers = new ArrayList<RelationMember>(members);723 List<RelationMember> newMembers = new ArrayList<RelationMember>(members); 724 724 725 725 for (int i=0; i < selectedIndices.size(); i++) { -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ParentRelationLoadingTask.java
r6248 r6316 58 58 private OsmDataLayer layer; 59 59 private Relation child; 60 private ArrayList<Relation> parents;60 private List<Relation> parents; 61 61 private Runnable continuation; 62 62 -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ReferringRelationsBrowserModel.java
r6084 r6316 15 15 /** the relation */ 16 16 private Relation relation; 17 private ArrayList<Relation> referrers;17 private List<Relation> referrers; 18 18 19 19 public ReferringRelationsBrowserModel() { -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationDialogManager.java
r6105 r6316 7 7 import java.util.HashMap; 8 8 import java.util.Iterator; 9 import java.util.Map; 9 10 import java.util.Map.Entry; 10 11 … … 92 93 93 94 /** the map of open dialogs */ 94 private final HashMap<DialogContext, RelationEditor> openDialogs;95 private final Map<DialogContext, RelationEditor> openDialogs; 95 96 96 97 /** -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationEditor.java
r5266 r6316 10 10 import java.util.ArrayList; 11 11 import java.util.Collection; 12 import java.util.List; 12 13 13 14 import org.openstreetmap.josm.Main; … … 31 32 32 33 /** the list of registered relation editor classes */ 33 private static ArrayList<Class<RelationEditor>> editors = new ArrayList<Class<RelationEditor>>();34 private static List<Class<RelationEditor>> editors = new ArrayList<Class<RelationEditor>>(); 34 35 35 36 /** -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/SelectionTableModel.java
r6084 r6316 20 20 /** this selection table model only displays selected primitives in this layer */ 21 21 private OsmDataLayer layer; 22 private ArrayList<OsmPrimitive> cache;22 private List<OsmPrimitive> cache; 23 23 24 24 /** -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/RelationSorter.java
r6258 r6316 73 73 */ 74 74 public List<RelationMember> sortMembers(List<RelationMember> relationMembers) { 75 ArrayList<RelationMember> newMembers = new ArrayList<RelationMember>();75 List<RelationMember> newMembers = new ArrayList<RelationMember>(); 76 76 77 77 // Sort members with custom mechanisms (relation-dependent) -
trunk/src/org/openstreetmap/josm/gui/download/PlaceSelection.java
r6310 r6316 386 386 387 387 static class NamedResultTableModel extends DefaultTableModel { 388 private ArrayList<SearchResult> data;388 private List<SearchResult> data; 389 389 private ListSelectionModel selectionModel; 390 390 -
trunk/src/org/openstreetmap/josm/gui/help/HelpBrowserHistory.java
r6223 r6316 4 4 import java.util.ArrayList; 5 5 import java.util.Collections; 6 import java.util.List; 6 7 import java.util.Observable; 7 8 8 9 public class HelpBrowserHistory extends Observable { 9 10 private HelpBrowser browser; 10 private ArrayList<String> history;11 private List<String> history; 11 12 private int historyPos = 0; 12 13 -
trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialogManager.java
r6223 r6316 9 9 import java.util.Collection; 10 10 import java.util.HashMap; 11 import java.util.List; 11 12 import java.util.Map; 12 13 … … 102 103 */ 103 104 public void hideAll() { 104 ArrayList<HistoryBrowserDialog> dialogs = new ArrayList<HistoryBrowserDialog>();105 List<HistoryBrowserDialog> dialogs = new ArrayList<HistoryBrowserDialog>(); 105 106 dialogs.addAll(this.dialogs.values()); 106 107 for (HistoryBrowserDialog dialog: dialogs) { -
trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java
r6105 r6316 8 8 import java.util.Collections; 9 9 import java.util.HashSet; 10 import java.util.List; 10 11 import java.util.Observable; 11 12 … … 553 554 public class TagTableModel extends AbstractTableModel { 554 555 555 private ArrayList<String> keys;556 private List<String> keys; 556 557 private PointInTimeType pointInTimeType; 557 558 -
trunk/src/org/openstreetmap/josm/gui/history/HistoryLoadTask.java
r5926 r6316 10 10 import java.util.Collection; 11 11 import java.util.HashSet; 12 import java.util.Set; 12 13 13 14 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 48 49 private boolean canceled = false; 49 50 private Exception lastException = null; 50 private HashSet<PrimitiveId> toLoad;51 private Set<PrimitiveId> toLoad; 51 52 private HistoryDataSet loadedData; 52 53 private OsmServerHistoryReader reader = null; -
trunk/src/org/openstreetmap/josm/gui/history/RelationMemberListTableCellRenderer.java
r6084 r6316 7 7 import java.awt.Component; 8 8 import java.util.HashMap; 9 import java.util.Map; 9 10 10 11 import javax.swing.ImageIcon; … … 30 31 public final static Color BGCOLOR_SELECTED = new Color(143,170,255); 31 32 32 private HashMap<OsmPrimitiveType, ImageIcon> icons;33 private Map<OsmPrimitiveType, ImageIcon> icons; 33 34 34 35 public RelationMemberListTableCellRenderer(){ -
trunk/src/org/openstreetmap/josm/gui/history/SelectionSynchronizer.java
r6084 r6316 3 3 4 4 import java.util.ArrayList; 5 import java.util.List; 5 6 6 7 import javax.swing.DefaultListSelectionModel; … … 11 12 public class SelectionSynchronizer implements ListSelectionListener { 12 13 13 private ArrayList<ListSelectionModel> participants;14 private List<ListSelectionModel> participants; 14 15 16 /** 17 * Constructs a new {@code SelectionSynchronizer}. 18 */ 15 19 public SelectionSynchronizer() { 16 20 participants = new ArrayList<ListSelectionModel>(); -
trunk/src/org/openstreetmap/josm/gui/history/TwoColumnDiff.java
r6246 r6316 5 5 import java.awt.Color; 6 6 import java.util.ArrayList; 7 import java.util.List; 7 8 8 9 import org.openstreetmap.josm.gui.history.TwoColumnDiff.Item.DiffItemType; … … 50 51 } 51 52 52 public ArrayList<Item> referenceDiff;53 public ArrayList<Item> currentDiff;53 public List<Item> referenceDiff; 54 public List<Item> currentDiff; 54 55 Object[] reference; 55 56 Object[] current; -
trunk/src/org/openstreetmap/josm/gui/io/CloseChangesetDialog.java
r6106 r6316 13 13 import java.util.ArrayList; 14 14 import java.util.Collection; 15 import java.util.List; 15 16 16 17 import javax.swing.AbstractAction; … … 214 215 public Collection<Changeset> getSelectedChangesets() { 215 216 Object [] sel = lstOpenChangesets.getSelectedValues(); 216 ArrayList<Changeset> ret = new ArrayList<Changeset>(sel.length);217 List<Changeset> ret = new ArrayList<Changeset>(sel.length); 217 218 for (Object o: sel) { 218 219 ret.add((Changeset)o); -
trunk/src/org/openstreetmap/josm/gui/io/CloseChangesetTask.java
r6084 r6316 7 7 import java.util.ArrayList; 8 8 import java.util.Collection; 9 import java.util.List; 9 10 10 11 import javax.swing.SwingUtilities; … … 26 27 private Exception lastException; 27 28 private Collection<Changeset> changesets; 28 private ArrayList<Changeset> closedChangesets;29 private List<Changeset> closedChangesets; 29 30 30 31 /** -
trunk/src/org/openstreetmap/josm/gui/io/UploadLayerTask.java
r6248 r6316 6 6 import java.util.Collection; 7 7 import java.util.HashSet; 8 import java.util.Set; 8 9 9 10 import org.openstreetmap.josm.Main; … … 45 46 private Changeset changeset; 46 47 private Collection<OsmPrimitive> toUpload; 47 private HashSet<IPrimitive> processedPrimitives;48 private Set<IPrimitive> processedPrimitives; 48 49 private UploadStrategySpecification strategy; 49 50 -
trunk/src/org/openstreetmap/josm/gui/io/UploadPrimitivesTask.java
r6248 r6316 10 10 import java.lang.reflect.InvocationTargetException; 11 11 import java.util.HashSet; 12 import java.util.Set; 12 13 13 14 import javax.swing.JOptionPane; … … 50 51 private OsmDataLayer layer; 51 52 private Changeset changeset; 52 private HashSet<IPrimitive> processedPrimitives;53 private Set<IPrimitive> processedPrimitives; 53 54 private UploadStrategySpecification strategy; 54 55 -
trunk/src/org/openstreetmap/josm/gui/io/UploadSelectionDialog.java
r6248 r6316 150 150 151 151 public List<OsmPrimitive> getSelectedPrimitives() { 152 ArrayList<OsmPrimitive> ret = new ArrayList<OsmPrimitive>();152 List<OsmPrimitive> ret = new ArrayList<OsmPrimitive>(); 153 153 ret.addAll(lstSelectedPrimitives.getOsmPrimitiveListModel().getPrimitives(lstSelectedPrimitives.getSelectedIndices())); 154 154 ret.addAll(lstDeletedPrimitives.getOsmPrimitiveListModel().getPrimitives(lstDeletedPrimitives.getSelectedIndices())); … … 247 247 if (indices == null || indices.length == 0) 248 248 return Collections.emptyList(); 249 ArrayList<OsmPrimitive> ret = new ArrayList<OsmPrimitive>(indices.length);249 List<OsmPrimitive> ret = new ArrayList<OsmPrimitive>(indices.length); 250 250 for (int i: indices) { 251 251 if (i < 0) { -
trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
r6296 r6316 501 501 SeparatorLayerAction.INSTANCE, 502 502 new LayerListPopup.InfoAction(this)}; 503 ArrayList<Action> actions = new ArrayList<Action>();503 List<Action> actions = new ArrayList<Action>(); 504 504 actions.addAll(Arrays.asList(new Action[]{ 505 505 LayerListDialog.getInstance().createActivateLayerAction(this), -
trunk/src/org/openstreetmap/josm/gui/layer/TMSLayer.java
r6310 r6316 28 28 import java.util.Map.Entry; 29 29 import java.util.Scanner; 30 import java.util.Set; 30 31 import java.util.concurrent.Callable; 31 32 import java.util.regex.Matcher; … … 154 155 } 155 156 156 HashSet<Tile> tileRequestsOutstanding = new HashSet<Tile>(); 157 private Set<Tile> tileRequestsOutstanding = new HashSet<Tile>(); 158 157 159 @Override 158 160 public synchronized void tileLoadingFinished(Tile tile, boolean success) { -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java
r6310 r6316 810 810 811 811 // Construct a list of images that have a date, and sort them on the date. 812 ArrayList<ImageEntry> dateImgLst = getSortedImgList();812 List<ImageEntry> dateImgLst = getSortedImgList(); 813 813 // Create a temporary copy for each image 814 814 for (ImageEntry ie : dateImgLst) { … … 988 988 GpxData gpx = gpxW.data; 989 989 990 ArrayList<ImageEntry> imgs = getSortedImgList();990 List<ImageEntry> imgs = getSortedImgList(); 991 991 PrimaryDateParser dateParser = new PrimaryDateParser(); 992 992 … … 1060 1060 } 1061 1061 1062 private ArrayList<ImageEntry>getSortedImgList() {1062 private List<ImageEntry> getSortedImgList() { 1063 1063 return getSortedImgList(cbExifImg.isSelected(), cbTaggedImg.isSelected()); 1064 1064 } … … 1071 1071 * @return matching images 1072 1072 */ 1073 private ArrayList<ImageEntry> getSortedImgList(boolean exif, boolean tagged) {1074 ArrayList<ImageEntry> dateImgLst = new ArrayList<ImageEntry>(yLayer.data.size());1073 private List<ImageEntry> getSortedImgList(boolean exif, boolean tagged) { 1074 List<ImageEntry> dateImgLst = new ArrayList<ImageEntry>(yLayer.data.size()); 1075 1075 for (ImageEntry e : yLayer.data) { 1076 1076 if (e.getExifTime() == null) { … … 1120 1120 * All images need a exifTime attribute and the List must be sorted according to these times. 1121 1121 */ 1122 private int matchGpxTrack( ArrayList<ImageEntry> images, GpxData selectedGpx, long offset) {1122 private int matchGpxTrack(List<ImageEntry> images, GpxData selectedGpx, long offset) { 1123 1123 int ret = 0; 1124 1124 … … 1159 1159 } 1160 1160 1161 private int matchPoints( ArrayList<ImageEntry> images, WayPoint prevWp, long prevWpTime,1161 private int matchPoints(List<ImageEntry> images, WayPoint prevWp, long prevWpTime, 1162 1162 WayPoint curWp, long curWpTime, long offset) { 1163 1163 // Time between the track point and the previous one, 5 sec if first point, i.e. photos take … … 1246 1246 } 1247 1247 1248 private int getLastIndexOfListBefore( ArrayList<ImageEntry> images, long searchedTime) {1248 private int getLastIndexOfListBefore(List<ImageEntry> images, long searchedTime) { 1249 1249 int lstSize= images.size(); 1250 1250 -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java
r6296 r6316 29 29 import java.util.LinkedList; 30 30 import java.util.List; 31 import java.util.Set; 31 32 32 33 import javax.swing.Action; … … 97 98 private GeoImageLayer layer; 98 99 private Collection<File> selection; 99 private HashSet<String> loadedDirectories = new HashSet<String>();100 private LinkedHashSet<String> errorMessages;100 private Set<String> loadedDirectories = new HashSet<String>(); 101 private Set<String> errorMessages; 101 102 private GpxLayer gpxLayer; 102 103 -
trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportImagesAction.java
r6070 r6316 8 8 import java.io.File; 9 9 import java.util.LinkedList; 10 import java.util.List; 10 11 11 12 import javax.swing.AbstractAction; … … 35 36 } 36 37 37 private void addRecursiveFiles(Li nkedList<File> files, File[] sel) {38 private void addRecursiveFiles(List<File> files, File[] sel) { 38 39 for (File f : sel) { 39 40 if (f.isDirectory()) { -
trunk/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java
r6211 r6316 21 21 public class StyleCache { 22 22 /* list of boundaries for the scale ranges */ 23 ArrayList<Double> bd;23 private final List<Double> bd; 24 24 /* styles for each scale range */ 25 ArrayList<StyleList> data;25 private final List<StyleList> data; 26 26 27 27 private final static Storage<StyleCache> internPool = new Storage<StyleCache>(); // TODO: clean up the intern pool from time to time (after purge or layer removal) -
trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSource.java
r6310 r6316 12 12 import java.util.LinkedList; 13 13 import java.util.List; 14 import java.util.Map; 14 15 15 16 import org.openstreetmap.josm.Main; … … 34 35 public class XmlStyleSource extends StyleSource implements StyleKeys { 35 36 36 protected final HashMap<String, IconPrototype> icons = new HashMap<String, IconPrototype>();37 protected final HashMap<String, LinePrototype> lines = new HashMap<String, LinePrototype>();38 protected final HashMap<String, LinemodPrototype> modifiers = new HashMap<String, LinemodPrototype>();39 protected final HashMap<String, AreaPrototype> areas = new HashMap<String, AreaPrototype>();40 protected final Li nkedList<IconPrototype> iconsList = new LinkedList<IconPrototype>();41 protected final Li nkedList<LinePrototype> linesList = new LinkedList<LinePrototype>();42 protected final Li nkedList<LinemodPrototype> modifiersList = new LinkedList<LinemodPrototype>();43 protected final Li nkedList<AreaPrototype> areasList = new LinkedList<AreaPrototype>();37 protected final Map<String, IconPrototype> icons = new HashMap<String, IconPrototype>(); 38 protected final Map<String, LinePrototype> lines = new HashMap<String, LinePrototype>(); 39 protected final Map<String, LinemodPrototype> modifiers = new HashMap<String, LinemodPrototype>(); 40 protected final Map<String, AreaPrototype> areas = new HashMap<String, AreaPrototype>(); 41 protected final List<IconPrototype> iconsList = new LinkedList<IconPrototype>(); 42 protected final List<LinePrototype> linesList = new LinkedList<LinePrototype>(); 43 protected final List<LinemodPrototype> modifiersList = new LinkedList<LinemodPrototype>(); 44 protected final List<AreaPrototype> areasList = new LinkedList<AreaPrototype>(); 44 45 45 46 public XmlStyleSource(String url, String name, String shortdescription) { -
trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java
r6248 r6316 465 465 466 466 public List<ExtendedSourceEntry> getSelected() { 467 ArrayList<ExtendedSourceEntry> ret = new ArrayList<ExtendedSourceEntry>();467 List<ExtendedSourceEntry> ret = new ArrayList<ExtendedSourceEntry>(); 468 468 for(int i=0; i<data.size();i++) { 469 469 if (selectionModel.isSelectedIndex(i)) { … … 998 998 999 999 protected static class IconPathTableModel extends AbstractTableModel { 1000 private ArrayList<String> data;1000 private List<String> data; 1001 1001 private DefaultListSelectionModel selectionModel; 1002 1002 -
trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java
r6296 r6316 200 200 201 201 private void exportSelectedToXML() { 202 ArrayList<String> keys = new ArrayList<String>();202 List<String> keys = new ArrayList<String>(); 203 203 boolean hasLists = false; 204 204 -
trunk/src/org/openstreetmap/josm/gui/preferences/advanced/ExportProfileAction.java
r6248 r6316 7 7 import java.io.File; 8 8 import java.util.ArrayList; 9 import java.util.List; 9 10 import java.util.Map; 10 11 … … 37 38 @Override 38 39 public void actionPerformed(ActionEvent ae) { 39 ArrayList<String> keys = new ArrayList<String>();40 List<String> keys = new ArrayList<String>(); 40 41 Map<String, Setting> all = prefs.getAllSettings(); 41 42 for (String key: all.keySet()) { -
trunk/src/org/openstreetmap/josm/gui/preferences/display/ColorPreference.java
r6084 r6316 12 12 import java.util.ArrayList; 13 13 import java.util.HashMap; 14 import java.util.List; 14 15 import java.util.Map; 15 16 import java.util.Map.Entry; … … 60 61 private DefaultTableModel tableModel; 61 62 private JTable colors; 62 private ArrayList<String> del = new ArrayList<String>();63 private List<String> del = new ArrayList<String>(); 63 64 64 65 JButton colorEdit; -
trunk/src/org/openstreetmap/josm/gui/preferences/projection/UTMProjectionChoice.java
r6295 r6316 110 110 @Override 111 111 public String[] allCodes() { 112 ArrayList<String> projections = new ArrayList<String>(60*4);112 List<String> projections = new ArrayList<String>(60*4); 113 113 for (int zone = 1;zone <= 60; zone++) { 114 114 for (Hemisphere hemisphere : Hemisphere.values()) { -
trunk/src/org/openstreetmap/josm/gui/preferences/shortcut/PrefJPanel.java
r6248 r6316 16 16 import java.util.ArrayList; 17 17 import java.util.LinkedHashMap; 18 import java.util.List; 18 19 import java.util.Map; 19 20 import java.util.regex.PatternSyntaxException; … … 373 374 expr = expr.replace("+", "\\+"); 374 375 // split search string on whitespace, do case-insensitive AND search 375 ArrayList<RowFilter<Object, Object>> andFilters = new ArrayList<RowFilter<Object, Object>>();376 List<RowFilter<Object, Object>> andFilters = new ArrayList<RowFilter<Object, Object>>(); 376 377 for (String word : expr.split("\\s+")) { 377 378 andFilters.add(RowFilter.regexFilter("(?i)" + word)); -
trunk/src/org/openstreetmap/josm/gui/tagging/TagEditorModel.java
r6309 r6316 36 36 37 37 /** the list holding the tags */ 38 protected final ArrayList<TagModel> tags =new ArrayList<TagModel>();38 protected final List<TagModel> tags =new ArrayList<TagModel>(); 39 39 40 40 /** indicates whether the model is dirty */ -
trunk/src/org/openstreetmap/josm/gui/tagging/TagModel.java
r3083 r6316 11 11 12 12 /** the list of values */ 13 private ArrayList<String> values = null;13 private List<String> values = null; 14 14 15 15 /** -
trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java
r6296 r6316 79 79 * Last value of each key used in presets, used for prefilling corresponding fields 80 80 */ 81 private static final HashMap<String,String> lastValue = new HashMap<String,String>();81 private static final Map<String,String> lastValue = new HashMap<String,String>(); 82 82 83 83 public static class PresetListEntry { -
trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetMenu.java
r6246 r6316 10 10 import java.util.ArrayList; 11 11 import java.util.Collections; 12 import java.util.List; 12 13 13 14 import javax.swing.Action; … … 16 17 import javax.swing.JPopupMenu; 17 18 import javax.swing.JSeparator; 19 18 20 import org.openstreetmap.josm.Main; 19 20 21 import org.openstreetmap.josm.tools.PresetTextComparator; 21 22 … … 80 81 Component[] items = menu.getMenuComponents(); 81 82 PresetTextComparator comp = new PresetTextComparator(); 82 ArrayList<JMenuItem> sortarray = new ArrayList<JMenuItem>();83 List<JMenuItem> sortarray = new ArrayList<JMenuItem>(); 83 84 int lastSeparator = 0; 84 85 for (int i = 0; i < items.length; i++) { -
trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetReader.java
r6248 r6316 39 39 private static File zipIcons = null; 40 40 41 public static Li nkedList<String> getPresetSources() {41 public static List<String> getPresetSources() { 42 42 LinkedList<String> sources = new LinkedList<String>(); 43 43 -
trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionList.java
r6248 r6316 258 258 } 259 259 260 ArrayList<AutoCompletionListItem> getList() {260 List<AutoCompletionListItem> getList() { 261 261 return list; 262 262 } -
trunk/src/org/openstreetmap/josm/gui/util/AdjustmentSynchronizer.java
r6147 r6316 11 11 import java.util.ArrayList; 12 12 import java.util.HashMap; 13 import java.util.List; 14 import java.util.Map; 13 15 import java.util.Observable; 14 16 import java.util.Observer; … … 26 28 public class AdjustmentSynchronizer implements AdjustmentListener { 27 29 28 private final ArrayList<Adjustable> synchronizedAdjustables;29 private final HashMap<Adjustable, Boolean> enabledMap;30 private final List<Adjustable> synchronizedAdjustables; 31 private final Map<Adjustable, Boolean> enabledMap; 30 32 31 33 private final Observable observable; -
trunk/src/org/openstreetmap/josm/gui/widgets/JosmComboBox.java
r6296 r6316 12 12 import java.util.Arrays; 13 13 import java.util.Collection; 14 import java.util.List; 14 15 15 16 import javax.accessibility.Accessible; … … 80 81 public JosmComboBox(ComboBoxModel aModel) { 81 82 super(aModel); 82 ArrayList<Object> list = new ArrayList<Object>(aModel.getSize());83 List<Object> list = new ArrayList<Object>(aModel.getSize()); 83 84 for (int i = 0; i<aModel.getSize(); i++) { 84 85 list.add(aModel.getElementAt(i)); -
trunk/src/org/openstreetmap/josm/io/Capabilities.java
r6248 r6316 43 43 44 44 private HashMap<String, HashMap<String,String>> capabilities; 45 private ArrayList<String> imageryBlacklist;45 private List<String> imageryBlacklist; 46 46 47 /** 48 * Constructs new {@code Capabilities}. 49 */ 47 50 public Capabilities() { 48 51 clear(); -
trunk/src/org/openstreetmap/josm/io/OsmReader.java
r6248 r6316 9 9 import java.util.ArrayList; 10 10 import java.util.Collection; 11 import java.util.List; 11 12 import java.util.regex.Matcher; 12 13 import java.util.regex.Pattern; … … 54 55 55 56 /** Used by plugins to register themselves as data postprocessors. */ 56 public static ArrayList<OsmServerReadPostprocessor> postprocessors;57 public static List<OsmServerReadPostprocessor> postprocessors; 57 58 58 59 /** register a new postprocessor */ -
trunk/src/org/openstreetmap/josm/io/OsmServerWriter.java
r5266 r6316 37 37 private Collection<IPrimitive> processed; 38 38 39 private static ArrayList<OsmServerWritePostprocessor> postprocessors;39 private static List<OsmServerWritePostprocessor> postprocessors; 40 40 public static void registerPostprocessor(OsmServerWritePostprocessor pp) { 41 41 if (postprocessors == null) { -
trunk/src/org/openstreetmap/josm/io/XmlWriter.java
r6070 r6316 6 6 import java.io.PrintWriter; 7 7 import java.util.HashMap; 8 import java.util.Map; 8 9 9 10 /** … … 65 66 * The output writer to save the values to. 66 67 */ 67 final private static HashMap<Character, String> encoding = new HashMap<Character, String>();68 private static final Map<Character, String> encoding = new HashMap<Character, String>(); 68 69 static { 69 70 encoding.put('<', "<"); -
trunk/src/org/openstreetmap/josm/io/imagery/HTMLGrabber.java
r6248 r6316 9 9 import java.text.MessageFormat; 10 10 import java.util.ArrayList; 11 import java.util.List; 11 12 import java.util.StringTokenizer; 12 13 … … 32 33 Main.info("Grabbing HTML " + (attempt > 1? "(attempt " + attempt + ") ":"") + url); 33 34 34 ArrayList<String> cmdParams = new ArrayList<String>();35 List<String> cmdParams = new ArrayList<String>(); 35 36 StringTokenizer st = new StringTokenizer(MessageFormat.format(PROP_BROWSER.get(), urlstring)); 36 37 while (st.hasMoreTokens()) { -
trunk/src/org/openstreetmap/josm/io/remotecontrol/AddTagsDialog.java
r6296 r6316 79 79 static class ExistingValues { 80 80 String tag; 81 HashMap<String, Integer> valueCount;81 Map<String, Integer> valueCount; 82 82 public ExistingValues(String tag) { 83 83 this.tag=tag; valueCount=new HashMap<String, Integer>(); -
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/AddNodeHandler.java
r6248 r6316 5 5 6 6 import java.awt.Point; 7 import java.util. HashMap;7 import java.util.Map; 8 8 9 9 import org.openstreetmap.josm.Main; … … 74 74 * @param args 75 75 */ 76 private void addNode( HashMap<String, String> args){76 private void addNode(Map<String, String> args){ 77 77 78 78 // Parse the arguments -
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/AddWayHandler.java
r6091 r6316 10 10 import java.util.LinkedList; 11 11 import java.util.List; 12 import java.util.Map; 12 13 13 14 import org.openstreetmap.josm.Main; … … 23 24 import org.openstreetmap.josm.io.remotecontrol.AddTagsDialog; 24 25 import org.openstreetmap.josm.io.remotecontrol.PermissionPrefWithDefault; 25 import org.openstreetmap.josm.io.remotecontrol.handler.RequestHandler.RequestHandlerBadRequestException;26 26 27 27 /** … … 40 40 * The place to remeber already added nodes (they are reused if needed @since 5845 41 41 */ 42 HashMap<LatLon, Node> addedNodes;42 Map<LatLon, Node> addedNodes; 43 43 44 44 @Override -
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/RequestHandler.java
r6248 r6316 12 12 import java.util.LinkedList; 13 13 import java.util.List; 14 import java.util.Map; 14 15 15 16 import javax.swing.JLabel; … … 33 34 34 35 /** The GET request arguments */ 35 protected HashMap<String,String> args;36 protected Map<String,String> args; 36 37 37 38 /** The request URL without "GET". */ -
trunk/src/org/openstreetmap/josm/tools/Geometry.java
r6296 r6316 51 51 int n = ways.size(); 52 52 @SuppressWarnings("unchecked") 53 ArrayList<Node>[] newNodes = new ArrayList[n];53 List<Node>[] newNodes = new ArrayList[n]; 54 54 BBox[] wayBounds = new BBox[n]; 55 55 boolean[] changedWays = new boolean[n]; … … 74 74 } 75 75 76 ArrayList<Node> way1Nodes = newNodes[seg1Way];77 ArrayList<Node> way2Nodes = newNodes[seg2Way];76 List<Node> way1Nodes = newNodes[seg1Way]; 77 List<Node> way2Nodes = newNodes[seg2Way]; 78 78 79 79 //iterate over primary segmemt … … 195 195 } 196 196 197 private static BBox getNodesBounds( ArrayList<Node> nodes) {197 private static BBox getNodesBounds(List<Node> nodes) { 198 198 199 199 BBox bounds = new BBox(nodes.get(0)); 200 for (Node n: nodes) {200 for (Node n: nodes) { 201 201 bounds.add(n.getCoor()); 202 202 } -
trunk/src/org/openstreetmap/josm/tools/I18n.java
r6248 r6316 15 15 import java.util.HashMap; 16 16 import java.util.Locale; 17 import java.util.Map; 17 18 import java.util.jar.JarInputStream; 18 19 import java.util.zip.ZipEntry; … … 121 122 "OptionPane.cancelButtonText" 122 123 }; 123 private static HashMap<String, String> strings = null;124 private static HashMap<String, String[]> pstrings = null;125 private static HashMap<String, PluralMode> languages = new HashMap<String, PluralMode>();124 private static Map<String, String> strings = null; 125 private static Map<String, String[]> pstrings = null; 126 private static Map<String, PluralMode> languages = new HashMap<String, PluralMode>(); 126 127 127 128 /** … … 476 477 } 477 478 478 private static boolean load(InputStream en, InputStream tr, boolean add) 479 { 480 HashMap<String, String> s; 481 HashMap<String, String[]> p; 482 if(add) 483 { 479 private static boolean load(InputStream en, InputStream tr, boolean add) { 480 Map<String, String> s; 481 Map<String, String[]> p; 482 if (add) { 484 483 s = strings; 485 484 p = pstrings; 486 } 487 else 488 { 485 } else { 489 486 s = new HashMap<String, String>(); 490 487 p = new HashMap<String, String[]>(); -
trunk/src/org/openstreetmap/josm/tools/ImageResource.java
r6290 r6316 6 6 import java.awt.image.BufferedImage; 7 7 import java.util.HashMap; 8 import java.util.Map; 8 9 9 10 import javax.swing.ImageIcon; … … 24 25 * Caches the image data for resized versions of the same image. 25 26 */ 26 private HashMap<Dimension, Image> imgCache = new HashMap<Dimension, Image>();27 private Map<Dimension, Image> imgCache = new HashMap<Dimension, Image>(); 27 28 private SVGDiagram svg; 28 29 public static final Dimension DEFAULT_DIMENSION = new Dimension(-1, -1); -
trunk/src/org/openstreetmap/josm/tools/Shortcut.java
r6248 r6316 156 156 // create a shortcut object from an string as saved in the preferences 157 157 private Shortcut(String prefString) { 158 ArrayList<String> s = (new ArrayList<String>(Main.pref.getCollection(prefString)));158 List<String> s = (new ArrayList<String>(Main.pref.getCollection(prefString))); 159 159 this.shortText = prefString.substring(15); 160 160 this.longText = s.get(0); -
trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java
r6248 r6316 12 12 import java.util.Iterator; 13 13 import java.util.LinkedList; 14 import java.util.List; 14 15 import java.util.Locale; 15 16 import java.util.Map; … … 46 47 private int lineNumber; 47 48 49 /** 50 * Constructs a new {@code PresetParsingException}. 51 */ 48 52 public PresetParsingException() { 49 53 super(); … … 274 278 * The queue of already parsed items from the parsing thread. 275 279 */ 276 private Li nkedList<Object> queue = new LinkedList<Object>();280 private List<Object> queue = new LinkedList<Object>(); 277 281 private Iterator<Object> queueIterator = null; 278 282
Note:
See TracChangeset
for help on using the changeset viewer.