Changeset 6316 in josm


Ignore:
Timestamp:
2013-10-07T20:18:17+02:00 (5 years ago)
Author:
Don-vip
Message:

Sonar/FindBugs - Loose coupling

Location:
trunk/src/org/openstreetmap/josm
Files:
111 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/Main.java

    r6311 r6316  
    10471047     * created dataset as projection change listener.
    10481048     */
    1049     private static final ArrayList<WeakReference<ProjectionChangeListener>> listeners = new ArrayList<WeakReference<ProjectionChangeListener>>();
     1049    private static final List<WeakReference<ProjectionChangeListener>> listeners = new ArrayList<WeakReference<ProjectionChangeListener>>();
    10501050
    10511051    private static void fireProjectionChanged(Projection oldValue, Projection newValue, Bounds oldBounds) {
     
    11271127    }
    11281128
    1129     private static final ArrayList<WeakReference<WindowSwitchListener>> windowSwitchListeners = new ArrayList<WeakReference<WindowSwitchListener>>();
     1129    private static final List<WeakReference<WindowSwitchListener>> windowSwitchListeners = new ArrayList<WeakReference<WindowSwitchListener>>();
    11301130
    11311131    /**
  • trunk/src/org/openstreetmap/josm/actions/AbstractInfoAction.java

    r6248 r6316  
    99import java.util.Collection;
    1010import java.util.Iterator;
     11import java.util.List;
    1112import java.util.regex.Pattern;
    1213
     
    117118
    118119    protected void launchInfoBrowsersForSelectedPrimitives() {
    119         ArrayList<OsmPrimitive> primitivesToShow = new ArrayList<OsmPrimitive>(getCurrentDataSet().getAllSelected());
     120        List<OsmPrimitive> primitivesToShow = new ArrayList<OsmPrimitive>(getCurrentDataSet().getAllSelected());
    120121
    121122        // filter out new primitives which are not yet uploaded to the server
  • trunk/src/org/openstreetmap/josm/actions/AlignInLineAction.java

    r6246 r6316  
    3232public final class AlignInLineAction extends JosmAction {
    3333
     34    /**
     35     * Constructs a new {@code AlignInLineAction}.
     36     */
    3437    public AlignInLineAction() {
    3538        super(tr("Align Nodes in Line"), "alignline", tr("Move the selected nodes in to a line."),
     
    3942
    4043    // 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) {
    4245        if(resultOut.length < 2)
    4346            throw new IllegalArgumentException();
     
    107110        List<Node> selectedNodes = new ArrayList<Node>(getCurrentDataSet().getSelectedNodes());
    108111        Collection<Way> selectedWays = getCurrentDataSet().getSelectedWays();
    109         ArrayList<Node> nodes = new ArrayList<Node>();
     112        List<Node> nodes = new ArrayList<Node>();
    110113
    111114        //// Decide what to align based on selection:
  • trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java

    r6156 r6316  
    374374    static public class NodeGraph {
    375375        static public List<NodePair> buildNodePairs(Way way, boolean directed) {
    376             ArrayList<NodePair> pairs = new ArrayList<NodePair>();
     376            List<NodePair> pairs = new ArrayList<NodePair>();
    377377            for (Pair<Node,Node> pair: way.getNodePairs(false /* don't sort */)) {
    378378                pairs.add(new NodePair(pair));
     
    385385
    386386        static public List<NodePair> buildNodePairs(List<Way> ways, boolean directed) {
    387             ArrayList<NodePair> pairs = new ArrayList<NodePair>();
     387            List<NodePair> pairs = new ArrayList<NodePair>();
    388388            for (Way w: ways) {
    389389                pairs.addAll(buildNodePairs(w, directed));
     
    393393
    394394        static public List<NodePair> eliminateDuplicateNodePairs(List<NodePair> pairs) {
    395             ArrayList<NodePair> cleaned = new ArrayList<NodePair>();
     395            List<NodePair> cleaned = new ArrayList<NodePair>();
    396396            for(NodePair p: pairs) {
    397397                if (!cleaned.contains(p) && !cleaned.contains(p.swap())) {
     
    446446                }
    447447            } else {
    448                 ArrayList<NodePair> l = new ArrayList<NodePair>();
     448                List<NodePair> l = new ArrayList<NodePair>();
    449449                l.add(pair);
    450450                successors.put(pair.getA(), l);
     
    458458                }
    459459            } else {
    460                 ArrayList<NodePair> l = new ArrayList<NodePair>();
     460                List<NodePair> l = new ArrayList<NodePair>();
    461461                l.add(pair);
    462462                predecessors.put(pair.getB(), l);
  • trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java

    r6265 r6316  
    457457        commitCommands(marktr("Added node on all intersections"));
    458458
    459         ArrayList<RelationRole> relations = new ArrayList<RelationRole>();
     459        List<RelationRole> relations = new ArrayList<RelationRole>();
    460460
    461461        // Remove ways from all relations so ways can be combined/split quietly
     
    467467        boolean warnAboutRelations = !relations.isEmpty() && allStartingWays.size() > 1;
    468468
    469         ArrayList<WayInPolygon> preparedWays = new ArrayList<WayInPolygon>();
     469        List<WayInPolygon> preparedWays = new ArrayList<WayInPolygon>();
    470470
    471471        for (Way way : outerStartingWays) {
    472             ArrayList<Way> splitWays = splitWayOnNodes(way, nodes);
     472            List<Way> splitWays = splitWayOnNodes(way, nodes);
    473473            preparedWays.addAll(markWayInsideSide(splitWays, false));
    474474        }
    475475
    476476        for (Way way : innerStartingWays) {
    477             ArrayList<Way> splitWays = splitWayOnNodes(way, nodes);
     477            List<Way> splitWays = splitWayOnNodes(way, nodes);
    478478            preparedWays.addAll(markWayInsideSide(splitWays, true));
    479479        }
    480480
    481481        // Find boundary ways
    482         ArrayList<Way> discardedWays = new ArrayList<Way>();
     482        List<Way> discardedWays = new ArrayList<Way>();
    483483        List<AssembledPolygon> bounadries = findBoundaryPolygons(preparedWays, discardedWays);
    484484
     
    659659     * @return list of parts, marked with the inside orientation.
    660660     */
    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>();
    664664
    665665        //prepare prev and next maps
     
    829829     * @return list of split ways (or original ways if no splitting is done).
    830830     */
    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>();
    834834        List<List<Node>> chunks = buildNodeChunks(way, nodes);
    835835
     
    13441344     * @return List of relations with roles the primitives was part of
    13451345     */
    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>();
    13481348
    13491349        for (Relation r : Main.main.getCurrentDataSet().getRelations()) {
     
    13831383     * @param relationsToDelete set of relations to delete.
    13841384     */
    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) {
    13891389            multiouters.add(ownMultipol);
    13901390        }
  • trunk/src/org/openstreetmap/josm/actions/MapRectifierWMSmenuAction.java

    r6246 r6316  
    99import java.awt.event.KeyEvent;
    1010import java.util.ArrayList;
     11import java.util.List;
    1112import java.util.regex.Matcher;
    1213import java.util.regex.Pattern;
     
    6364     * List of available rectifier services. May be extended from the outside
    6465     */
    65     public ArrayList<RectifierService> services = new ArrayList<RectifierService>();
     66    public List<RectifierService> services = new ArrayList<RectifierService>();
    6667
    6768    public MapRectifierWMSmenuAction() {
  • trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java

    r6275 r6316  
    198198
    199199        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());
    201201            for (Node n: w.getNodes()) {
    202202                if (! nodesToDelete.contains(n) && n != targetNode) {
  • trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java

    r6296 r6316  
    4444            "You can add two nodes to the selection. Then, the direction is fixed by these two reference nodes. "+
    4545            "(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.)");
    4747
    4848    /**
     
    144144        }
    145145
    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>();
    148148        final Collection<OsmPrimitive> sel = getCurrentDataSet().getSelected();
    149149
     
    170170                    }
    171171                    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) {
    174174                            commands.addAll(orthogonalize(g, nodeList));
    175175                        }
     
    200200     * Collect groups of ways with common nodes in order to orthogonalize each group separately.
    201201     */
    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>>();
    204204        Set<WayData> remaining = new HashSet<WayData>(wayDataList);
    205205        while (!remaining.isEmpty()) {
    206             ArrayList<WayData> group = new ArrayList<WayData>();
     206            List<WayData> group = new ArrayList<WayData>();
    207207            groups.add(group);
    208208            Iterator<WayData> it = remaining.iterator();
     
    247247     *
    248248     **/
    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 {
    252250        // find average heading
    253251        double headingAll;
  • trunk/src/org/openstreetmap/josm/actions/UnGlueAction.java

    r6289 r6316  
    297297        cmds.add(new AddCommand(newNode));
    298298
    299         ArrayList<Node> nn = new ArrayList<Node>();
     299        List<Node> nn = new ArrayList<Node>();
    300300        for (Node pushNode : w.getNodes()) {
    301301            if (originalNode == pushNode) {
  • trunk/src/org/openstreetmap/josm/actions/UploadAction.java

    r6084 r6316  
    88import java.awt.event.KeyEvent;
    99import java.util.LinkedList;
     10import java.util.List;
    1011
    1112import javax.swing.JOptionPane;
     
    5152     * however, a plugin might also want to insert something after that.
    5253     */
    53     private static final LinkedList<UploadHook> uploadHooks = new LinkedList<UploadHook>();
    54     private static final LinkedList<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>();
    5556    static {
    5657        /**
  • trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadTaskList.java

    r6069 r6316  
    141141     */
    142142    protected void updatePotentiallyDeletedPrimitives(Set<OsmPrimitive> potentiallyDeleted) {
    143         final ArrayList<OsmPrimitive> toSelect = new ArrayList<OsmPrimitive>();
     143        final List<OsmPrimitive> toSelect = new ArrayList<OsmPrimitive>();
    144144        for (OsmPrimitive primitive : potentiallyDeleted) {
    145145            if (primitive != null) {
  • trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java

    r6310 r6316  
    424424        Collection<OsmPrimitive> newSelection = new LinkedList<OsmPrimitive>(ds.getSelected());
    425425
    426         ArrayList<Way> reuseWays = new ArrayList<Way>(),
     426        List<Way> reuseWays = new ArrayList<Way>(),
    427427                replacedWays = new ArrayList<Way>();
    428428        boolean newNode = false;
     
    652652    }
    653653
    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) {
    655655        Map<Way, List<Integer>> insertPoints = new HashMap<Way, List<Integer>>();
    656656        for (WaySegment ws : wss) {
  • trunk/src/org/openstreetmap/josm/actions/mapmode/ImproveWayAccuracyAction.java

    r6310 r6316  
    613613     */
    614614    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>();
    617617        final Collection<OsmPrimitive> sel = getCurrentDataSet().getSelected();
    618618
  • trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWayAction.java

    r6310 r6316  
    33
    44import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
     5import static org.openstreetmap.josm.tools.I18n.marktr;
    56import static org.openstreetmap.josm.tools.I18n.tr;
    67
     
    1819import java.util.Collection;
    1920import java.util.LinkedHashSet;
     21import java.util.Set;
    2022
    2123import javax.swing.JOptionPane;
     
    4042import org.openstreetmap.josm.gui.util.GuiHelper;
    4143import org.openstreetmap.josm.tools.Geometry;
    42 import static org.openstreetmap.josm.tools.I18n.marktr;
    4344import org.openstreetmap.josm.tools.ImageProvider;
    4445import org.openstreetmap.josm.tools.Shortcut;
     
    122123    private WaySegment referenceSegment;
    123124    private ParallelWays pWays;
    124     private LinkedHashSet<Way> sourceWays;
     125    private Set<Way> sourceWays;
    125126    private EastNorth helperLineStart;
    126127    private EastNorth helperLineEnd;
  • trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWays.java

    r6069 r6316  
    178178
    179179    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());
    181181        for (int i = 0; i < sortedNodes.size() - (isClosedPath() ? 1 : 0); i++) {
    182182            commands.add(new AddCommand(sortedNodes.get(i)));
  • trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java

    r6248 r6316  
    111111
    112112    public static List<String> getSearchExpressionHistory() {
    113         ArrayList<String> ret = new ArrayList<String>(getSearchHistory().size());
     113        List<String> ret = new ArrayList<String>(getSearchHistory().size());
    114114        for (SearchSetting ss: getSearchHistory()) {
    115115            ret.add(ss.text);
     
    120120    private static SearchSetting lastSearch = null;
    121121
     122    /**
     123     * Constructs a new {@code SearchAction}.
     124     */
    122125    public SearchAction() {
    123126        super(tr("Search..."), "dialogs/search", tr("Search for objects."),
  • trunk/src/org/openstreetmap/josm/command/RemoveNodesCommand.java

    r6253 r6316  
    77import java.util.HashSet;
    88import java.util.List;
     9import java.util.Set;
     10
    911import javax.swing.Icon;
    1012
     
    2628
    2729    private final Way way;
    28     private final HashSet<Node> rmNodes;
     30    private final Set<Node> rmNodes;
    2931
    3032    public RemoveNodesCommand(Way way, List<Node> rmNodes) {
  • trunk/src/org/openstreetmap/josm/corrector/ReverseWayTagCorrector.java

    r6069 r6316  
    196196            new HashMap<OsmPrimitive, List<TagCorrection>>();
    197197
    198         ArrayList<TagCorrection> tagCorrections = new ArrayList<TagCorrection>();
     198        List<TagCorrection> tagCorrections = new ArrayList<TagCorrection>();
    199199        for (String key : way.keySet()) {
    200200            String value = way.get(key);
     
    221221        Map<OsmPrimitive, List<RoleCorrection>> roleCorrectionMap =
    222222            new HashMap<OsmPrimitive, List<RoleCorrection>>();
    223         ArrayList<RoleCorrection> roleCorrections = new ArrayList<RoleCorrection>();
     223        List<RoleCorrection> roleCorrections = new ArrayList<RoleCorrection>();
    224224
    225225        Collection<OsmPrimitive> referrers = oldway.getReferrers();
  • trunk/src/org/openstreetmap/josm/data/APIDataSet.java

    r6084 r6316  
    333333                visit(path, relation);
    334334            }
    335             ArrayList<Relation> ret = new ArrayList<Relation>(relations);
     335            List<Relation> ret = new ArrayList<Relation>(relations);
    336336            Collections.sort(
    337337                    ret,
  • trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java

    r6313 r6316  
    206206     */
    207207    public static void exportPreferencesKeysByPatternToFile(String fileName, boolean append, String pattern) {
    208         ArrayList<String> keySet = new ArrayList<String>();
     208        List<String> keySet = new ArrayList<String>();
    209209        Map<String, Setting> allSettings = Main.pref.getAllSettings();
    210210        for (String key: allSettings.keySet()) {
     
    750750            // "lists"
    751751            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>>();
    753753                array.addAll(entry.getValue());
    754754                mainpref.putArray(entry.getKey(), array);
  • trunk/src/org/openstreetmap/josm/data/imagery/ImageryLayerInfo.java

    r6310 r6316  
    2222
    2323    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>();
    2626
    2727    private final static String[] DEFAULT_LAYER_SITES = {
     
    9292
    9393        Collection<String> defaults = Main.pref.getCollection("imagery.layers.default");
    94         ArrayList<String> defaultsSave = new ArrayList<String>();
     94        List<String> defaultsSave = new ArrayList<String>();
    9595        for (ImageryInfo def : defaultLayers) {
    9696            if (def.isDefaultEntry()) {
  • trunk/src/org/openstreetmap/josm/data/imagery/OffsetBookmark.java

    r6248 r6316  
    4545
    4646    public OffsetBookmark(Collection<String> list) {
    47         ArrayList<String> array = new ArrayList<String>(list);
     47        List<String> array = new ArrayList<String>(list);
    4848        this.projectionCode = array.get(0);
    4949        this.layerName = array.get(1);
     
    6060    }
    6161
    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);
    6464        if (projectionCode != null) {
    6565            res.add(projectionCode);
  • trunk/src/org/openstreetmap/josm/data/osm/DataSetMerger.java

    r6296 r6316  
    402402        targetDataSet.beginUpdate();
    403403        try {
    404             ArrayList<? extends OsmPrimitive> candidates = new ArrayList<Node>(targetDataSet.getNodes());
     404            List<? extends OsmPrimitive> candidates = new ArrayList<Node>(targetDataSet.getNodes());
    405405            for (Node node: sourceDataSet.getNodes()) {
    406406                mergePrimitive(node, candidates);
  • trunk/src/org/openstreetmap/josm/data/osm/OsmUtils.java

    r3083 r6316  
    44import java.util.ArrayList;
    55import java.util.Arrays;
     6import java.util.List;
    67import java.util.Locale;
    78
    89public class OsmUtils {
    910
    10     static ArrayList<String> TRUE_VALUES = new ArrayList<String>(Arrays
     11    static List<String> TRUE_VALUES = new ArrayList<String>(Arrays
    1112            .asList(new String[] { "true", "yes", "1", "on" }));
    12     static ArrayList<String> FALSE_VALUES = new ArrayList<String>(Arrays
     13    static List<String> FALSE_VALUES = new ArrayList<String>(Arrays
    1314            .asList(new String[] { "false", "no", "0", "off" }));
    14     static ArrayList<String> REVERSE_VALUES = new ArrayList<String>(Arrays
     15    static List<String> REVERSE_VALUES = new ArrayList<String>(Arrays
    1516            .asList(new String[] { "reverse", "-1" }));
    1617
  • trunk/src/org/openstreetmap/josm/data/osm/Relation.java

    r6140 r6316  
    367367        boolean locked = writeLock();
    368368        try {
    369             ArrayList<RelationMember> todelete = new ArrayList<RelationMember>();
     369            List<RelationMember> todelete = new ArrayList<RelationMember>();
    370370            for (RelationMember member: members) {
    371371                if (primitives.contains(member.getMember())) {
  • trunk/src/org/openstreetmap/josm/data/osm/User.java

    r6223 r6316  
    136136     * @return list of names
    137137     */
    138     public ArrayList<String> getNames() {
     138    public List<String> getNames() {
    139139        return new ArrayList<String>(names);
    140140    }
  • trunk/src/org/openstreetmap/josm/data/osm/history/History.java

    r6264 r6316  
    2525
    2626    private static History filter(History history, FilterPredicate predicate) {
    27         ArrayList<HistoryOsmPrimitive> out = new ArrayList<HistoryOsmPrimitive>();
     27        List<HistoryOsmPrimitive> out = new ArrayList<HistoryOsmPrimitive>();
    2828        for (HistoryOsmPrimitive primitive: history.versions) {
    2929            if (predicate.matches(primitive)) {
     
    3535
    3636    /** the list of object snapshots */
    37     private ArrayList<HistoryOsmPrimitive> versions;
     37    private List<HistoryOsmPrimitive> versions;
    3838    /** the object id */
    3939    private final long id;
     
    6363
    6464    public History sortAscending() {
    65         ArrayList<HistoryOsmPrimitive> copy = new ArrayList<HistoryOsmPrimitive>(versions);
     65        List<HistoryOsmPrimitive> copy = new ArrayList<HistoryOsmPrimitive>(versions);
    6666        Collections.sort(
    6767                copy,
     
    7777
    7878    public History sortDescending() {
    79         ArrayList<HistoryOsmPrimitive> copy = new ArrayList<HistoryOsmPrimitive>(versions);
     79        List<HistoryOsmPrimitive> copy = new ArrayList<HistoryOsmPrimitive>(versions);
    8080        Collections.sort(
    8181                copy,
  • trunk/src/org/openstreetmap/josm/data/osm/history/HistoryDataSet.java

    r6084 r6316  
    55import java.util.ArrayList;
    66import java.util.HashMap;
     7import java.util.List;
    78import java.util.concurrent.CopyOnWriteArrayList;
    89
     
    8788
    8889        SimplePrimitiveId pid = new SimplePrimitiveId(id, type);
    89         ArrayList<HistoryOsmPrimitive> versions = data.get(pid);
     90        List<HistoryOsmPrimitive> versions = data.get(pid);
    9091        if (versions == null)
    9192            return null;
     
    141142    public History getHistory(PrimitiveId pid) throws IllegalArgumentException{
    142143        CheckParameterUtil.ensureParameterNotNull(pid, "pid");
    143         ArrayList<HistoryOsmPrimitive> versions = data.get(pid);
     144        List<HistoryOsmPrimitive> versions = data.get(pid);
    144145        if (versions == null)
    145146            return null;
  • trunk/src/org/openstreetmap/josm/data/osm/history/HistoryRelation.java

    r5440 r6316  
    2121public class HistoryRelation extends HistoryOsmPrimitive{
    2222
    23     private ArrayList<RelationMemberData> members = new ArrayList<RelationMemberData>();
     23    private List<RelationMemberData> members = new ArrayList<RelationMemberData>();
    2424
    2525    /**
  • trunk/src/org/openstreetmap/josm/data/osm/history/HistoryWay.java

    r6069 r6316  
    2121public class HistoryWay extends HistoryOsmPrimitive {
    2222
    23     private ArrayList<Long> nodeIds = new ArrayList<Long>();
     23    private List<Long> nodeIds = new ArrayList<Long>();
    2424
    2525    /**
  • trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2GridShiftFile.java

    r6267 r6316  
    2525import java.util.ArrayList;
    2626import java.util.HashMap;
     27import java.util.List;
    2728
    2829import org.openstreetmap.josm.tools.Utils;
     
    166167    private NTV2SubGrid[] createSubGridTree(NTV2SubGrid[] subGrid) {
    167168        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>>();
    169170        for (int i = 0; i < subGrid.length; i++) {
    170171            if (subGrid[i].getParentSubGridName().equalsIgnoreCase("NONE")) {
     
    179180                topLevelSubGrid[topLevelCount++] = subGrid[i];
    180181            } else {
    181                 ArrayList<NTV2SubGrid> parent = subGridMap.get(subGrid[i].getParentSubGridName());
     182                List<NTV2SubGrid> parent = subGridMap.get(subGrid[i].getParentSubGridName());
    182183                parent.add(subGrid[i]);
    183184            }
     
    185186        NTV2SubGrid[] nullArray = new NTV2SubGrid[0];
    186187        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());
    188189            if (!subSubGrids.isEmpty()) {
    189190                NTV2SubGrid[] subGridArray = subSubGrids.toArray(nullArray);
  • trunk/src/org/openstreetmap/josm/data/validation/tests/TurnrestrictionTest.java

    r6241 r6316  
    6666                return;
    6767
    68             ArrayList<OsmPrimitive> l = new ArrayList<OsmPrimitive>();
     68            List<OsmPrimitive> l = new ArrayList<OsmPrimitive>();
    6969            l.add(r);
    7070            l.add(m.getMember());
  • trunk/src/org/openstreetmap/josm/gui/BookmarkList.java

    r6248 r6316  
    1515import java.util.Collections;
    1616import java.util.LinkedList;
     17import java.util.List;
    1718import java.util.regex.Matcher;
    1819import java.util.regex.Pattern;
     
    4647
    4748        public Bookmark(Collection<String> list) throws NumberFormatException, IllegalArgumentException {
    48             ArrayList<String> array = new ArrayList<String>(list);
     49            List<String> array = new ArrayList<String>(list);
    4950            if(array.size() < 5)
    5051                throw new IllegalArgumentException(tr("Wrong number of arguments for bookmark"));
  • trunk/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java

    r6084 r6316  
    4949    static private DefaultNameFormatter instance;
    5050
    51     private static final LinkedList<NameFormatterHook> formatHooks = new LinkedList<NameFormatterHook>();
     51    private static final List<NameFormatterHook> formatHooks = new LinkedList<NameFormatterHook>();
    5252
    5353    /**
     
    507507        .append(primitive.getId())
    508508        .append("<br>");
    509         ArrayList<String> keyList = new ArrayList<String>(primitive.keySet());
     509        List<String> keyList = new ArrayList<String>(primitive.keySet());
    510510        Collections.sort(keyList);
    511511        for (int i = 0; i < keyList.size(); i++) {
     
    680680        .append(primitive.getId())
    681681        .append("<br>");
    682         ArrayList<String> keyList = new ArrayList<String>(primitive.getTags().keySet());
     682        List<String> keyList = new ArrayList<String>(primitive.getTags().keySet());
    683683        Collections.sort(keyList);
    684684        for (int i = 0; i < keyList.size(); i++) {
  • trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java

    r6310 r6316  
    104104    // For easy access when inherited
    105105    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>();
    107107
    108108    /**
  • trunk/src/org/openstreetmap/josm/gui/MainApplet.java

    r6084 r6316  
    3838
    3939    public static final class UploadPreferencesAction extends JosmAction {
     40        /**
     41         * Constructs a new {@code UploadPreferencesAction}.
     42         */
    4043        public UploadPreferencesAction() {
    4144            super(tr("Upload Preferences"), "upload-preferences", tr("Upload the current preferences to the server"),
  • trunk/src/org/openstreetmap/josm/gui/MapView.java

    r6203 r6316  
    210210    public MouseEvent lastMEvent = new MouseEvent(this, 0, 0, 0, 0, 0, 0, false); // In case somebody reads it before first mouse move
    211211
    212     private final LinkedList<MapViewPaintable> temporaryLayers = new LinkedList<MapViewPaintable>();
     212    private final List<MapViewPaintable> temporaryLayers = new LinkedList<MapViewPaintable>();
    213213
    214214    private BufferedImage nonChangedLayersBuffer;
     
    500500     */
    501501    protected List<Layer> getVisibleLayersInZOrder() {
    502         ArrayList<Layer> ret = new ArrayList<Layer>();
     502        List<Layer> ret = new ArrayList<Layer>();
    503503        for (Layer l: layers) {
    504504            if (l.isVisible()) {
     
    734734     */
    735735    public <T> List<T>  getLayersOfType(Class<T> ofType) {
    736         ArrayList<T> ret = new ArrayList<T>();
     736        List<T> ret = new ArrayList<T>();
    737737        for (Layer layer : getAllLayersAsList()) {
    738738            if (ofType.isInstance(layer)) {
  • trunk/src/org/openstreetmap/josm/gui/actionsupport/DeleteFromRelationConfirmationDialog.java

    r6084 r6316  
    1717import java.util.Comparator;
    1818import java.util.HashSet;
     19import java.util.List;
    1920import java.util.Set;
    2021
     
    186187     */
    187188    public static class RelationMemberTableModel extends DefaultTableModel {
    188         private ArrayList<RelationToChildReference> data;
     189        private List<RelationToChildReference> data;
    189190
    190191        /**
  • trunk/src/org/openstreetmap/josm/gui/bbox/SlippyMapBBoxChooser.java

    r6246 r6316  
    1717import java.util.HashSet;
    1818import java.util.List;
     19import java.util.Set;
    1920import java.util.concurrent.CopyOnWriteArrayList;
    2021
     
    100101     */
    101102    public static class TMSTileSourceProvider implements TileSourceProvider {
    102         static final HashSet<String> existingSlippyMapUrls = new HashSet<String>();
     103        static final Set<String> existingSlippyMapUrls = new HashSet<String>();
    103104        static {
    104105            // 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  
    276276     */
    277277    public Command buildResolveCommand() {
    278         ArrayList<Command> commands = new ArrayList<Command>();
     278        List<Command> commands = new ArrayList<Command>();
    279279
    280280        if (tagMerger.getModel().getNumResolvedConflicts() > 0) {
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMergeModel.java

    r6248 r6316  
    7474    private static final int MAX_DELETED_PRIMITIVE_IN_DIALOG = 5;
    7575
    76     protected HashMap<ListRole, ArrayList<T>> entries;
     76    protected Map<ListRole, ArrayList<T>> entries;
    7777
    7878    protected EntriesTableModel myEntriesTableModel;
     
    693693        }
    694694
    695         protected ArrayList<T> getEntries() {
     695        protected List<T> getEntries() {
    696696            return entries.get(role);
    697697        }
     
    702702         * @return the opposite list of entries
    703703         */
    704         protected ArrayList<T> getOppositeEntries() {
     704        protected List<T> getOppositeEntries() {
    705705            ListRole opposite = getComparePairListModel().getSelectedComparePair().getOppositeRole(role);
    706706            return entries.get(opposite);
     
    738738     */
    739739    protected class EntriesSelectionModel extends DefaultListSelectionModel {
    740         private final ArrayList<T> entries;
     740        private final List<T> entries;
    741741
    742742        public EntriesSelectionModel(ArrayList<T> nodes) {
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListTableCellRenderer.java

    r6084 r6316  
    66import java.util.ArrayList;
    77import java.util.Collections;
     8import java.util.List;
    89
    910import javax.swing.BorderFactory;
     
    5859        // show the key/value-pairs, sorted by key
    5960        //
    60         ArrayList<String> keyList = new ArrayList<String>(primitive.keySet());
     61        List<String> keyList = new ArrayList<String>(primitive.keySet());
    6162        Collections.sort(keyList);
    6263        for (int i = 0; i < keyList.size(); i++) {
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberTableCellRenderer.java

    r6084 r6316  
    66import java.util.ArrayList;
    77import java.util.Collections;
     8import java.util.List;
    89
    910import javax.swing.BorderFactory;
     
    4344        .append(primitive.getId())
    4445        .append("<br>");
    45         ArrayList<String> keyList = new ArrayList<String>(primitive.keySet());
     46        List<String> keyList = new ArrayList<String>(primitive.keySet());
    4647        Collections.sort(keyList);
    4748        for (int i = 0; i < keyList.size(); i++) {
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMerger.java

    r6267 r6316  
    1414import java.awt.event.MouseEvent;
    1515import java.util.ArrayList;
     16import java.util.List;
    1617
    1718import javax.swing.AbstractAction;
     
    333334     */
    334335    static class AdjustmentSynchronizer implements AdjustmentListener {
    335         private final ArrayList<Adjustable> synchronizedAdjustables;
     336        private final List<Adjustable> synchronizedAdjustables;
    336337
    337338        public AdjustmentSynchronizer() {
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueResolutionDecision.java

    r5266 r6316  
    148148     */
    149149    public List<String> getValues() {
    150         ArrayList<String> ret = new ArrayList<String>(tags.getValues());
     150        List<String> ret = new ArrayList<String>(tags.getValues());
    151151        ret.remove("");
    152152        ret.remove(null);
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolverModel.java

    r6084 r6316  
    1010import java.util.HashSet;
    1111import java.util.List;
     12import java.util.Map;
    1213import java.util.Set;
    1314
     
    2425    private List<String> displayedKeys;
    2526    private Set<String> keysWithConflicts;
    26     private HashMap<String, MultiValueResolutionDecision> decisions;
     27    private Map<String, MultiValueResolutionDecision> decisions;
    2728    private int numConflicts;
    2829    private PropertyChangeSupport support;
     
    3031    private boolean showTagsWithMultiValuesOnly = false;
    3132
     33    /**
     34     * Constructs a new {@code TagConflictResolverModel}.
     35     */
    3236    public TagConflictResolverModel() {
    3337        numConflicts = 0;
  • trunk/src/org/openstreetmap/josm/gui/dialogs/HistoryDialog.java

    r6084 r6316  
    6262    protected ReloadAction reloadAction;
    6363
     64    /**
     65     * Constructs a new {@code HistoryDialog}.
     66     */
    6467    public HistoryDialog() {
    6568        super(tr("History"), "history", tr("Display the history of all selected items."),
     
    149152     */
    150153    static class HistoryItemTableModel extends DefaultTableModel implements SelectionChangedListener{
    151         private ArrayList<OsmPrimitive> data;
     154        private List<OsmPrimitive> data;
    152155        private DefaultListSelectionModel selectionModel;
    153156
     
    175178
    176179        protected List<OsmPrimitive> getSelectedPrimitives() {
    177             ArrayList<OsmPrimitive> ret = new ArrayList<OsmPrimitive>();
     180            List<OsmPrimitive> ret = new ArrayList<OsmPrimitive>();
    178181            for (int i=0; i< data.size(); i++) {
    179182                if (selectionModel.isSelectedIndex(i)) {
     
    227230        public List<OsmPrimitive> getPrimitives(int [] rows) {
    228231            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);
    230233            for (int row: rows) {
    231234                ret.add(data.get(row));
  • trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java

    r6270 r6316  
    12051205         */
    12061206        public List<Layer> getSelectedLayers() {
    1207             ArrayList<Layer> selected = new ArrayList<Layer>();
     1207            List<Layer> selected = new ArrayList<Layer>();
    12081208            for (int i=0; i<getLayers().size(); i++) {
    12091209                if (selectionModel.isSelectedIndex(i)) {
     
    12221222         */
    12231223        public List<Integer> getSelectedRows() {
    1224             ArrayList<Integer> selected = new ArrayList<Integer>();
     1224            List<Integer> selected = new ArrayList<Integer>();
    12251225            for (int i=0; i<getLayers().size();i++) {
    12261226                if (selectionModel.isSelectedIndex(i)) {
     
    13821382         */
    13831383        public List<Layer> getPossibleMergeTargets(Layer source) {
    1384             ArrayList<Layer> targets = new ArrayList<Layer>();
     1384            List<Layer> targets = new ArrayList<Layer>();
    13851385            if (source == null)
    13861386                return targets;
  • trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java

    r6296 r6316  
    382382     */
    383383    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;
    386386        private DefaultListSelectionModel selectionModel;
    387387        private SearchCompiler.Match filter;
     
    538538         */
    539539        public List<Relation> getSelectedRelations() {
    540             ArrayList<Relation> ret = new ArrayList<Relation>();
     540            List<Relation> ret = new ArrayList<Relation>();
    541541            for (int i=0; i<getSize();i++) {
    542542                if (!selectionModel.isSelectedIndex(i)) {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/UserListDialog.java

    r6248 r6316  
    290290     */
    291291    static class UserTableModel extends DefaultTableModel {
    292         private ArrayList<UserInfo> data;
     292        private List<UserInfo> data;
    293293
    294294        public UserTableModel() {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManagerModel.java

    r5958 r6316  
    7676     */
    7777    public List<Changeset> getSelectedChangesets() {
    78         ArrayList<Changeset> ret = new ArrayList<Changeset>();
     78        List<Changeset> ret = new ArrayList<Changeset>();
    7979        for (int i =0; i< data.size();i++) {
    8080            Changeset cs = data.get(i);
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentPanel.java

    r6267 r6316  
    230230
    231231        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());
    233233            for (HistoryOsmPrimitive p: primitives) {
    234234                if (HistoryDataSet.getInstance().getHistory(p.getPrimitiveId()) == null) {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentTableModel.java

    r6084 r6316  
    77import java.util.HashSet;
    88import java.util.Iterator;
     9import java.util.List;
    910import java.util.Set;
    1011
     
    2324public class ChangesetContentTableModel extends AbstractTableModel {
    2425
    25     private final ArrayList<ChangesetContentEntry> data = new ArrayList<ChangesetContentEntry>();
     26    private final List<ChangesetContentEntry> data = new ArrayList<ChangesetContentEntry>();
    2627    private DefaultListSelectionModel selectionModel;
    2728
  • trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java

    r6310 r6316  
    376376                commands.add(new ChangePropertyCommand(sel, key, null));
    377377                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>>();
    379379                    for (OsmPrimitive osm: sel) {
    380380                        String val = osm.get(key);
     
    383383                                map.get(val).add(osm);
    384384                            } else {
    385                                 ArrayList<OsmPrimitive> v = new ArrayList<OsmPrimitive>();
     385                                List<OsmPrimitive> v = new ArrayList<OsmPrimitive>();
    386386                                v.add(osm);
    387387                                map.put(val, v);
     
    389389                        }
    390390                    }
    391                     for (Map.Entry<String, ArrayList<OsmPrimitive>> e: map.entrySet()) {
     391                    for (Map.Entry<String, List<OsmPrimitive>> e: map.entrySet()) {
    392392                        commands.add(new ChangePropertyCommand(e.getValue(), newkey, e.getKey()));
    393393                    }
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java

    r6296 r6316  
    648648     */
    649649    protected void cleanSelfReferences() {
    650         ArrayList<OsmPrimitive> toCheck = new ArrayList<OsmPrimitive>();
     650        List<OsmPrimitive> toCheck = new ArrayList<OsmPrimitive>();
    651651        toCheck.add(getRelation());
    652652        if (memberTableModel.hasMembersReferringTo(toCheck)) {
     
    769769            if (primitives == null || primitives.isEmpty())
    770770                return primitives;
    771             ArrayList<OsmPrimitive> ret = new ArrayList<OsmPrimitive>();
     771            List<OsmPrimitive> ret = new ArrayList<OsmPrimitive>();
    772772            for (OsmPrimitive primitive : primitives) {
    773773                if (primitive instanceof Relation && getRelation() != null && getRelation().equals(primitive)) {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTable.java

    r6070 r6316  
    1212import java.util.Arrays;
    1313import java.util.Collection;
     14import java.util.List;
    1415
    1516import javax.swing.AbstractAction;
     
    124125                if (Main.isDisplayingMapView()) {
    125126                    Collection<RelationMember> sel = getMemberTableModel().getSelectedMembers();
    126                     final ArrayList<OsmPrimitive> toHighlight = new ArrayList<OsmPrimitive>();
     127                    final List<OsmPrimitive> toHighlight = new ArrayList<OsmPrimitive>();
    127128                    for (RelationMember r: sel) {
    128129                        if (r.getMember().isUsable()) {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableModel.java

    r6296 r6316  
    387387
    388388    protected List<Integer> getSelectedIndices() {
    389         ArrayList<Integer> selectedIndices = new ArrayList<Integer>();
     389        List<Integer> selectedIndices = new ArrayList<Integer>();
    390390        for (int i = 0; i < members.size(); i++) {
    391391            if (getSelectionModel().isSelectedIndex(i)) {
     
    471471     */
    472472    public Collection<RelationMember> getSelectedMembers() {
    473         ArrayList<RelationMember> selectedMembers = new ArrayList<RelationMember>();
     473        List<RelationMember> selectedMembers = new ArrayList<RelationMember>();
    474474        for (int i : getSelectedIndices()) {
    475475            selectedMembers.add(members.get(i));
     
    721721            Collections.reverse(selectedIndicesReversed);
    722722
    723             ArrayList<RelationMember> newMembers = new ArrayList<RelationMember>(members);
     723            List<RelationMember> newMembers = new ArrayList<RelationMember>(members);
    724724
    725725            for (int i=0; i < selectedIndices.size(); i++) {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ParentRelationLoadingTask.java

    r6248 r6316  
    5858    private OsmDataLayer layer;
    5959    private Relation child;
    60     private ArrayList<Relation> parents;
     60    private List<Relation> parents;
    6161    private Runnable continuation;
    6262
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ReferringRelationsBrowserModel.java

    r6084 r6316  
    1515    /** the relation */
    1616    private Relation relation;
    17     private ArrayList<Relation> referrers;
     17    private List<Relation> referrers;
    1818
    1919    public ReferringRelationsBrowserModel() {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationDialogManager.java

    r6105 r6316  
    77import java.util.HashMap;
    88import java.util.Iterator;
     9import java.util.Map;
    910import java.util.Map.Entry;
    1011
     
    9293
    9394    /** the map of open dialogs */
    94     private final HashMap<DialogContext, RelationEditor> openDialogs;
     95    private final Map<DialogContext, RelationEditor> openDialogs;
    9596
    9697    /**
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationEditor.java

    r5266 r6316  
    1010import java.util.ArrayList;
    1111import java.util.Collection;
     12import java.util.List;
    1213
    1314import org.openstreetmap.josm.Main;
     
    3132
    3233    /** 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>>();
    3435
    3536    /**
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/SelectionTableModel.java

    r6084 r6316  
    2020    /** this selection table model only displays selected primitives in this layer */
    2121    private OsmDataLayer layer;
    22     private ArrayList<OsmPrimitive> cache;
     22    private List<OsmPrimitive> cache;
    2323
    2424    /**
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/RelationSorter.java

    r6258 r6316  
    7373     */
    7474    public List<RelationMember> sortMembers(List<RelationMember> relationMembers) {
    75         ArrayList<RelationMember> newMembers = new ArrayList<RelationMember>();
     75        List<RelationMember> newMembers = new ArrayList<RelationMember>();
    7676
    7777        // Sort members with custom mechanisms (relation-dependent)
  • trunk/src/org/openstreetmap/josm/gui/download/PlaceSelection.java

    r6310 r6316  
    386386
    387387    static class NamedResultTableModel extends DefaultTableModel {
    388         private ArrayList<SearchResult> data;
     388        private List<SearchResult> data;
    389389        private ListSelectionModel selectionModel;
    390390
  • trunk/src/org/openstreetmap/josm/gui/help/HelpBrowserHistory.java

    r6223 r6316  
    44import java.util.ArrayList;
    55import java.util.Collections;
     6import java.util.List;
    67import java.util.Observable;
    78
    89public class HelpBrowserHistory extends Observable {
    910    private HelpBrowser browser;
    10     private ArrayList<String> history;
     11    private List<String> history;
    1112    private int historyPos = 0;
    1213
  • trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialogManager.java

    r6223 r6316  
    99import java.util.Collection;
    1010import java.util.HashMap;
     11import java.util.List;
    1112import java.util.Map;
    1213
     
    102103     */
    103104    public void hideAll() {
    104         ArrayList<HistoryBrowserDialog> dialogs = new ArrayList<HistoryBrowserDialog>();
     105        List<HistoryBrowserDialog> dialogs = new ArrayList<HistoryBrowserDialog>();
    105106        dialogs.addAll(this.dialogs.values());
    106107        for (HistoryBrowserDialog dialog: dialogs) {
  • trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java

    r6105 r6316  
    88import java.util.Collections;
    99import java.util.HashSet;
     10import java.util.List;
    1011import java.util.Observable;
    1112
     
    553554    public class TagTableModel extends AbstractTableModel {
    554555
    555         private ArrayList<String> keys;
     556        private List<String> keys;
    556557        private PointInTimeType pointInTimeType;
    557558
  • trunk/src/org/openstreetmap/josm/gui/history/HistoryLoadTask.java

    r5926 r6316  
    1010import java.util.Collection;
    1111import java.util.HashSet;
     12import java.util.Set;
    1213
    1314import org.openstreetmap.josm.data.osm.OsmPrimitive;
     
    4849    private boolean canceled = false;
    4950    private Exception lastException  = null;
    50     private HashSet<PrimitiveId> toLoad;
     51    private Set<PrimitiveId> toLoad;
    5152    private HistoryDataSet loadedData;
    5253    private OsmServerHistoryReader reader = null;
  • trunk/src/org/openstreetmap/josm/gui/history/RelationMemberListTableCellRenderer.java

    r6084 r6316  
    77import java.awt.Component;
    88import java.util.HashMap;
     9import java.util.Map;
    910
    1011import javax.swing.ImageIcon;
     
    3031    public final static Color BGCOLOR_SELECTED = new Color(143,170,255);
    3132
    32     private HashMap<OsmPrimitiveType, ImageIcon> icons;
     33    private Map<OsmPrimitiveType, ImageIcon> icons;
    3334
    3435    public RelationMemberListTableCellRenderer(){
  • trunk/src/org/openstreetmap/josm/gui/history/SelectionSynchronizer.java

    r6084 r6316  
    33
    44import java.util.ArrayList;
     5import java.util.List;
    56
    67import javax.swing.DefaultListSelectionModel;
     
    1112public class SelectionSynchronizer implements ListSelectionListener {
    1213
    13     private ArrayList<ListSelectionModel> participants;
     14    private List<ListSelectionModel> participants;
    1415
     16    /**
     17     * Constructs a new {@code SelectionSynchronizer}.
     18     */
    1519    public SelectionSynchronizer() {
    1620        participants = new ArrayList<ListSelectionModel>();
  • trunk/src/org/openstreetmap/josm/gui/history/TwoColumnDiff.java

    r6246 r6316  
    55import java.awt.Color;
    66import java.util.ArrayList;
     7import java.util.List;
    78
    89import org.openstreetmap.josm.gui.history.TwoColumnDiff.Item.DiffItemType;
     
    5051    }
    5152
    52     public ArrayList<Item> referenceDiff;
    53     public ArrayList<Item> currentDiff;
     53    public List<Item> referenceDiff;
     54    public List<Item> currentDiff;
    5455    Object[] reference;
    5556    Object[] current;
  • trunk/src/org/openstreetmap/josm/gui/io/CloseChangesetDialog.java

    r6106 r6316  
    1313import java.util.ArrayList;
    1414import java.util.Collection;
     15import java.util.List;
    1516
    1617import javax.swing.AbstractAction;
     
    214215    public Collection<Changeset> getSelectedChangesets() {
    215216        Object [] sel = lstOpenChangesets.getSelectedValues();
    216         ArrayList<Changeset> ret = new ArrayList<Changeset>(sel.length);
     217        List<Changeset> ret = new ArrayList<Changeset>(sel.length);
    217218        for (Object o: sel) {
    218219            ret.add((Changeset)o);
  • trunk/src/org/openstreetmap/josm/gui/io/CloseChangesetTask.java

    r6084 r6316  
    77import java.util.ArrayList;
    88import java.util.Collection;
     9import java.util.List;
    910
    1011import javax.swing.SwingUtilities;
     
    2627    private Exception lastException;
    2728    private Collection<Changeset> changesets;
    28     private ArrayList<Changeset> closedChangesets;
     29    private List<Changeset> closedChangesets;
    2930
    3031    /**
  • trunk/src/org/openstreetmap/josm/gui/io/UploadLayerTask.java

    r6248 r6316  
    66import java.util.Collection;
    77import java.util.HashSet;
     8import java.util.Set;
    89
    910import org.openstreetmap.josm.Main;
     
    4546    private Changeset changeset;
    4647    private Collection<OsmPrimitive> toUpload;
    47     private HashSet<IPrimitive> processedPrimitives;
     48    private Set<IPrimitive> processedPrimitives;
    4849    private UploadStrategySpecification strategy;
    4950
  • trunk/src/org/openstreetmap/josm/gui/io/UploadPrimitivesTask.java

    r6248 r6316  
    1010import java.lang.reflect.InvocationTargetException;
    1111import java.util.HashSet;
     12import java.util.Set;
    1213
    1314import javax.swing.JOptionPane;
     
    5051    private OsmDataLayer layer;
    5152    private Changeset changeset;
    52     private HashSet<IPrimitive> processedPrimitives;
     53    private Set<IPrimitive> processedPrimitives;
    5354    private UploadStrategySpecification strategy;
    5455
  • trunk/src/org/openstreetmap/josm/gui/io/UploadSelectionDialog.java

    r6248 r6316  
    150150
    151151    public List<OsmPrimitive> getSelectedPrimitives() {
    152         ArrayList<OsmPrimitive> ret  = new ArrayList<OsmPrimitive>();
     152        List<OsmPrimitive> ret  = new ArrayList<OsmPrimitive>();
    153153        ret.addAll(lstSelectedPrimitives.getOsmPrimitiveListModel().getPrimitives(lstSelectedPrimitives.getSelectedIndices()));
    154154        ret.addAll(lstDeletedPrimitives.getOsmPrimitiveListModel().getPrimitives(lstDeletedPrimitives.getSelectedIndices()));
     
    247247            if (indices == null || indices.length == 0)
    248248                return Collections.emptyList();
    249             ArrayList<OsmPrimitive> ret = new ArrayList<OsmPrimitive>(indices.length);
     249            List<OsmPrimitive> ret = new ArrayList<OsmPrimitive>(indices.length);
    250250            for (int i: indices) {
    251251                if (i < 0) {
  • trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java

    r6296 r6316  
    501501                SeparatorLayerAction.INSTANCE,
    502502                new LayerListPopup.InfoAction(this)};
    503         ArrayList<Action> actions = new ArrayList<Action>();
     503        List<Action> actions = new ArrayList<Action>();
    504504        actions.addAll(Arrays.asList(new Action[]{
    505505                LayerListDialog.getInstance().createActivateLayerAction(this),
  • trunk/src/org/openstreetmap/josm/gui/layer/TMSLayer.java

    r6310 r6316  
    2828import java.util.Map.Entry;
    2929import java.util.Scanner;
     30import java.util.Set;
    3031import java.util.concurrent.Callable;
    3132import java.util.regex.Matcher;
     
    154155    }
    155156
    156     HashSet<Tile> tileRequestsOutstanding = new HashSet<Tile>();
     157    private Set<Tile> tileRequestsOutstanding = new HashSet<Tile>();
     158   
    157159    @Override
    158160    public synchronized void tileLoadingFinished(Tile tile, boolean success) {
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java

    r6310 r6316  
    810810
    811811            // 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();
    813813            // Create a temporary copy for each image
    814814            for (ImageEntry ie : dateImgLst) {
     
    988988            GpxData gpx = gpxW.data;
    989989
    990             ArrayList<ImageEntry> imgs = getSortedImgList();
     990            List<ImageEntry> imgs = getSortedImgList();
    991991            PrimaryDateParser dateParser = new PrimaryDateParser();
    992992
     
    10601060    }
    10611061
    1062     private ArrayList<ImageEntry> getSortedImgList() {
     1062    private List<ImageEntry> getSortedImgList() {
    10631063        return getSortedImgList(cbExifImg.isSelected(), cbTaggedImg.isSelected());
    10641064    }
     
    10711071     * @return matching images
    10721072     */
    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());
    10751075        for (ImageEntry e : yLayer.data) {
    10761076            if (e.getExifTime() == null) {
     
    11201120     * All images need a exifTime attribute and the List must be sorted according to these times.
    11211121     */
    1122     private int matchGpxTrack(ArrayList<ImageEntry> images, GpxData selectedGpx, long offset) {
     1122    private int matchGpxTrack(List<ImageEntry> images, GpxData selectedGpx, long offset) {
    11231123        int ret = 0;
    11241124
     
    11591159    }
    11601160
    1161     private int matchPoints(ArrayList<ImageEntry> images, WayPoint prevWp, long prevWpTime,
     1161    private int matchPoints(List<ImageEntry> images, WayPoint prevWp, long prevWpTime,
    11621162            WayPoint curWp, long curWpTime, long offset) {
    11631163        // Time between the track point and the previous one, 5 sec if first point, i.e. photos take
     
    12461246    }
    12471247
    1248     private int getLastIndexOfListBefore(ArrayList<ImageEntry> images, long searchedTime) {
     1248    private int getLastIndexOfListBefore(List<ImageEntry> images, long searchedTime) {
    12491249        int lstSize= images.size();
    12501250
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java

    r6296 r6316  
    2929import java.util.LinkedList;
    3030import java.util.List;
     31import java.util.Set;
    3132
    3233import javax.swing.Action;
     
    9798        private GeoImageLayer layer;
    9899        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;
    101102        private GpxLayer gpxLayer;
    102103
  • trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportImagesAction.java

    r6070 r6316  
    88import java.io.File;
    99import java.util.LinkedList;
     10import java.util.List;
    1011
    1112import javax.swing.AbstractAction;
     
    3536    }
    3637
    37     private void addRecursiveFiles(LinkedList<File> files, File[] sel) {
     38    private void addRecursiveFiles(List<File> files, File[] sel) {
    3839        for (File f : sel) {
    3940            if (f.isDirectory()) {
  • trunk/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java

    r6211 r6316  
    2121public class StyleCache {
    2222    /* list of boundaries for the scale ranges */
    23     ArrayList<Double> bd;
     23    private final List<Double> bd;
    2424    /* styles for each scale range */
    25     ArrayList<StyleList> data;
     25    private final List<StyleList> data;
    2626
    2727    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  
    1212import java.util.LinkedList;
    1313import java.util.List;
     14import java.util.Map;
    1415
    1516import org.openstreetmap.josm.Main;
     
    3435public class XmlStyleSource extends StyleSource implements StyleKeys {
    3536
    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 LinkedList<IconPrototype> iconsList = new LinkedList<IconPrototype>();
    41     protected final LinkedList<LinePrototype> linesList = new LinkedList<LinePrototype>();
    42     protected final LinkedList<LinemodPrototype> modifiersList = new LinkedList<LinemodPrototype>();
    43     protected final LinkedList<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>();
    4445
    4546    public XmlStyleSource(String url, String name, String shortdescription) {
  • trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java

    r6248 r6316  
    465465
    466466        public List<ExtendedSourceEntry> getSelected() {
    467             ArrayList<ExtendedSourceEntry> ret = new ArrayList<ExtendedSourceEntry>();
     467            List<ExtendedSourceEntry> ret = new ArrayList<ExtendedSourceEntry>();
    468468            for(int i=0; i<data.size();i++) {
    469469                if (selectionModel.isSelectedIndex(i)) {
     
    998998
    999999    protected static class IconPathTableModel extends AbstractTableModel {
    1000         private ArrayList<String> data;
     1000        private List<String> data;
    10011001        private DefaultListSelectionModel selectionModel;
    10021002
  • trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java

    r6296 r6316  
    200200
    201201    private void exportSelectedToXML() {
    202         ArrayList<String> keys = new ArrayList<String>();
     202        List<String> keys = new ArrayList<String>();
    203203        boolean hasLists = false;
    204204
  • trunk/src/org/openstreetmap/josm/gui/preferences/advanced/ExportProfileAction.java

    r6248 r6316  
    77import java.io.File;
    88import java.util.ArrayList;
     9import java.util.List;
    910import java.util.Map;
    1011
     
    3738    @Override
    3839    public void actionPerformed(ActionEvent ae) {
    39         ArrayList<String> keys = new ArrayList<String>();
     40        List<String> keys = new ArrayList<String>();
    4041        Map<String, Setting> all = prefs.getAllSettings();
    4142        for (String key: all.keySet()) {
  • trunk/src/org/openstreetmap/josm/gui/preferences/display/ColorPreference.java

    r6084 r6316  
    1212import java.util.ArrayList;
    1313import java.util.HashMap;
     14import java.util.List;
    1415import java.util.Map;
    1516import java.util.Map.Entry;
     
    6061    private DefaultTableModel tableModel;
    6162    private JTable colors;
    62     private ArrayList<String> del = new ArrayList<String>();
     63    private List<String> del = new ArrayList<String>();
    6364
    6465    JButton colorEdit;
  • trunk/src/org/openstreetmap/josm/gui/preferences/projection/UTMProjectionChoice.java

    r6295 r6316  
    110110    @Override
    111111    public String[] allCodes() {
    112         ArrayList<String> projections = new ArrayList<String>(60*4);
     112        List<String> projections = new ArrayList<String>(60*4);
    113113        for (int zone = 1;zone <= 60; zone++) {
    114114            for (Hemisphere hemisphere : Hemisphere.values()) {
  • trunk/src/org/openstreetmap/josm/gui/preferences/shortcut/PrefJPanel.java

    r6248 r6316  
    1616import java.util.ArrayList;
    1717import java.util.LinkedHashMap;
     18import java.util.List;
    1819import java.util.Map;
    1920import java.util.regex.PatternSyntaxException;
     
    373374                    expr = expr.replace("+", "\\+");
    374375                    // 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>>();
    376377                    for (String word : expr.split("\\s+")) {
    377378                        andFilters.add(RowFilter.regexFilter("(?i)" + word));
  • trunk/src/org/openstreetmap/josm/gui/tagging/TagEditorModel.java

    r6309 r6316  
    3636
    3737    /** the list holding the tags */
    38     protected final ArrayList<TagModel> tags =new ArrayList<TagModel>();
     38    protected final List<TagModel> tags =new ArrayList<TagModel>();
    3939
    4040    /** indicates whether the model is dirty */
  • trunk/src/org/openstreetmap/josm/gui/tagging/TagModel.java

    r3083 r6316  
    1111
    1212    /** the list of values */
    13     private ArrayList<String> values = null;
     13    private List<String> values = null;
    1414
    1515    /**
  • trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java

    r6296 r6316  
    7979     * Last value of each key used in presets, used for prefilling corresponding fields
    8080     */
    81     private static final HashMap<String,String> lastValue = new HashMap<String,String>();
     81    private static final Map<String,String> lastValue = new HashMap<String,String>();
    8282
    8383    public static class PresetListEntry {
  • trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetMenu.java

    r6246 r6316  
    1010import java.util.ArrayList;
    1111import java.util.Collections;
     12import java.util.List;
    1213
    1314import javax.swing.Action;
     
    1617import javax.swing.JPopupMenu;
    1718import javax.swing.JSeparator;
     19
    1820import org.openstreetmap.josm.Main;
    19 
    2021import org.openstreetmap.josm.tools.PresetTextComparator;
    2122
     
    8081        Component[] items = menu.getMenuComponents();
    8182        PresetTextComparator comp = new PresetTextComparator();
    82         ArrayList<JMenuItem> sortarray = new ArrayList<JMenuItem>();
     83        List<JMenuItem> sortarray = new ArrayList<JMenuItem>();
    8384        int lastSeparator = 0;
    8485        for (int i = 0; i < items.length; i++) {
  • trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetReader.java

    r6248 r6316  
    3939    private static File zipIcons = null;
    4040   
    41     public static LinkedList<String> getPresetSources() {
     41    public static List<String> getPresetSources() {
    4242        LinkedList<String> sources = new LinkedList<String>();
    4343
  • trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionList.java

    r6248 r6316  
    258258    }
    259259
    260     ArrayList<AutoCompletionListItem> getList() {
     260    List<AutoCompletionListItem> getList() {
    261261        return list;
    262262    }
  • trunk/src/org/openstreetmap/josm/gui/util/AdjustmentSynchronizer.java

    r6147 r6316  
    1111import java.util.ArrayList;
    1212import java.util.HashMap;
     13import java.util.List;
     14import java.util.Map;
    1315import java.util.Observable;
    1416import java.util.Observer;
     
    2628public class AdjustmentSynchronizer implements AdjustmentListener {
    2729
    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;
    3032
    3133    private final Observable observable;
  • trunk/src/org/openstreetmap/josm/gui/widgets/JosmComboBox.java

    r6296 r6316  
    1212import java.util.Arrays;
    1313import java.util.Collection;
     14import java.util.List;
    1415
    1516import javax.accessibility.Accessible;
     
    8081    public JosmComboBox(ComboBoxModel aModel) {
    8182        super(aModel);
    82         ArrayList<Object> list = new ArrayList<Object>(aModel.getSize());
     83        List<Object> list = new ArrayList<Object>(aModel.getSize());
    8384        for (int i = 0; i<aModel.getSize(); i++) {
    8485            list.add(aModel.getElementAt(i));
  • trunk/src/org/openstreetmap/josm/io/Capabilities.java

    r6248 r6316  
    4343
    4444    private HashMap<String, HashMap<String,String>> capabilities;
    45     private ArrayList<String> imageryBlacklist;
     45    private List<String> imageryBlacklist;
    4646
     47    /**
     48     * Constructs new {@code Capabilities}.
     49     */
    4750    public Capabilities() {
    4851        clear();
  • trunk/src/org/openstreetmap/josm/io/OsmReader.java

    r6248 r6316  
    99import java.util.ArrayList;
    1010import java.util.Collection;
     11import java.util.List;
    1112import java.util.regex.Matcher;
    1213import java.util.regex.Pattern;
     
    5455
    5556    /** Used by plugins to register themselves as data postprocessors. */
    56     public static ArrayList<OsmServerReadPostprocessor> postprocessors;
     57    public static List<OsmServerReadPostprocessor> postprocessors;
    5758
    5859    /** register a new postprocessor */
  • trunk/src/org/openstreetmap/josm/io/OsmServerWriter.java

    r5266 r6316  
    3737    private Collection<IPrimitive> processed;
    3838
    39     private static ArrayList<OsmServerWritePostprocessor> postprocessors;
     39    private static List<OsmServerWritePostprocessor> postprocessors;
    4040    public static void registerPostprocessor(OsmServerWritePostprocessor pp) {
    4141        if (postprocessors == null) {
  • trunk/src/org/openstreetmap/josm/io/XmlWriter.java

    r6070 r6316  
    66import java.io.PrintWriter;
    77import java.util.HashMap;
     8import java.util.Map;
    89
    910/**
     
    6566     * The output writer to save the values to.
    6667     */
    67     final private static HashMap<Character, String> encoding = new HashMap<Character, String>();
     68    private static final Map<Character, String> encoding = new HashMap<Character, String>();
    6869    static {
    6970        encoding.put('<', "&lt;");
  • trunk/src/org/openstreetmap/josm/io/imagery/HTMLGrabber.java

    r6248 r6316  
    99import java.text.MessageFormat;
    1010import java.util.ArrayList;
     11import java.util.List;
    1112import java.util.StringTokenizer;
    1213
     
    3233        Main.info("Grabbing HTML " + (attempt > 1? "(attempt " + attempt + ") ":"") + url);
    3334
    34         ArrayList<String> cmdParams = new ArrayList<String>();
     35        List<String> cmdParams = new ArrayList<String>();
    3536        StringTokenizer st = new StringTokenizer(MessageFormat.format(PROP_BROWSER.get(), urlstring));
    3637        while (st.hasMoreTokens()) {
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/AddTagsDialog.java

    r6296 r6316  
    7979    static class ExistingValues {
    8080        String tag;
    81         HashMap<String, Integer> valueCount;
     81        Map<String, Integer> valueCount;
    8282        public ExistingValues(String tag) {
    8383            this.tag=tag; valueCount=new HashMap<String, Integer>();
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/AddNodeHandler.java

    r6248 r6316  
    55
    66import java.awt.Point;
    7 import java.util.HashMap;
     7import java.util.Map;
    88
    99import org.openstreetmap.josm.Main;
     
    7474     * @param args
    7575     */
    76     private void addNode(HashMap<String, String> args){
     76    private void addNode(Map<String, String> args){
    7777
    7878        // Parse the arguments
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/AddWayHandler.java

    r6091 r6316  
    1010import java.util.LinkedList;
    1111import java.util.List;
     12import java.util.Map;
    1213
    1314import org.openstreetmap.josm.Main;
     
    2324import org.openstreetmap.josm.io.remotecontrol.AddTagsDialog;
    2425import org.openstreetmap.josm.io.remotecontrol.PermissionPrefWithDefault;
    25 import org.openstreetmap.josm.io.remotecontrol.handler.RequestHandler.RequestHandlerBadRequestException;
    2626
    2727/**
     
    4040     * The place to remeber already added nodes (they are reused if needed @since 5845
    4141     */
    42     HashMap<LatLon, Node> addedNodes;
     42    Map<LatLon, Node> addedNodes;
    4343
    4444    @Override
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/RequestHandler.java

    r6248 r6316  
    1212import java.util.LinkedList;
    1313import java.util.List;
     14import java.util.Map;
    1415
    1516import javax.swing.JLabel;
     
    3334
    3435    /** The GET request arguments */
    35     protected HashMap<String,String> args;
     36    protected Map<String,String> args;
    3637
    3738    /** The request URL without "GET". */
  • trunk/src/org/openstreetmap/josm/tools/Geometry.java

    r6296 r6316  
    5151        int n = ways.size();
    5252        @SuppressWarnings("unchecked")
    53         ArrayList<Node>[] newNodes = new ArrayList[n];
     53        List<Node>[] newNodes = new ArrayList[n];
    5454        BBox[] wayBounds = new BBox[n];
    5555        boolean[] changedWays = new boolean[n];
     
    7474                }
    7575
    76                 ArrayList<Node> way1Nodes = newNodes[seg1Way];
    77                 ArrayList<Node> way2Nodes = newNodes[seg2Way];
     76                List<Node> way1Nodes = newNodes[seg1Way];
     77                List<Node> way2Nodes = newNodes[seg2Way];
    7878
    7979                //iterate over primary segmemt
     
    195195    }
    196196
    197     private static BBox getNodesBounds(ArrayList<Node> nodes) {
     197    private static BBox getNodesBounds(List<Node> nodes) {
    198198
    199199        BBox bounds = new BBox(nodes.get(0));
    200         for(Node n: nodes) {
     200        for (Node n: nodes) {
    201201            bounds.add(n.getCoor());
    202202        }
  • trunk/src/org/openstreetmap/josm/tools/I18n.java

    r6248 r6316  
    1515import java.util.HashMap;
    1616import java.util.Locale;
     17import java.util.Map;
    1718import java.util.jar.JarInputStream;
    1819import java.util.zip.ZipEntry;
     
    121122        "OptionPane.cancelButtonText"
    122123    };
    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>();
    126127
    127128    /**
     
    476477    }
    477478
    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) {
    484483            s = strings;
    485484            p = pstrings;
    486         }
    487         else
    488         {
     485        } else {
    489486            s = new HashMap<String, String>();
    490487            p = new HashMap<String, String[]>();
  • trunk/src/org/openstreetmap/josm/tools/ImageResource.java

    r6290 r6316  
    66import java.awt.image.BufferedImage;
    77import java.util.HashMap;
     8import java.util.Map;
    89
    910import javax.swing.ImageIcon;
     
    2425     * Caches the image data for resized versions of the same image.
    2526     */
    26     private HashMap<Dimension, Image> imgCache = new HashMap<Dimension, Image>();
     27    private Map<Dimension, Image> imgCache = new HashMap<Dimension, Image>();
    2728    private SVGDiagram svg;
    2829    public static final Dimension DEFAULT_DIMENSION = new Dimension(-1, -1);
  • trunk/src/org/openstreetmap/josm/tools/Shortcut.java

    r6248 r6316  
    156156    // create a shortcut object from an string as saved in the preferences
    157157    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)));
    159159        this.shortText = prefString.substring(15);
    160160        this.longText = s.get(0);
  • trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java

    r6248 r6316  
    1212import java.util.Iterator;
    1313import java.util.LinkedList;
     14import java.util.List;
    1415import java.util.Locale;
    1516import java.util.Map;
     
    4647        private int lineNumber;
    4748
     49        /**
     50         * Constructs a new {@code PresetParsingException}.
     51         */
    4852        public PresetParsingException() {
    4953            super();
     
    274278     * The queue of already parsed items from the parsing thread.
    275279     */
    276     private LinkedList<Object> queue = new LinkedList<Object>();
     280    private List<Object> queue = new LinkedList<Object>();
    277281    private Iterator<Object> queueIterator = null;
    278282
Note: See TracChangeset for help on using the changeset viewer.