Ignore:
Timestamp:
2012-01-26T21:52:34+01:00 (12 years ago)
Author:
jttt
Message:

Use static class were appropriate

Location:
trunk/src/org/openstreetmap/josm/data/validation/tests
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/validation/tests/DeprecatedTags.java

    r4806 r4874  
    11package org.openstreetmap.josm.data.validation.tests;
    22
    3 import org.openstreetmap.josm.data.osm.Node;
    4 import org.openstreetmap.josm.data.osm.Relation;
    5 import org.openstreetmap.josm.data.osm.Way;
    63import static org.openstreetmap.josm.tools.I18n.tr;
    74
     
    96import java.util.LinkedList;
    107import java.util.List;
     8
    119import org.openstreetmap.josm.command.ChangePropertyCommand;
    1210import org.openstreetmap.josm.command.Command;
    1311import org.openstreetmap.josm.command.SequenceCommand;
     12import org.openstreetmap.josm.data.osm.Node;
    1413import org.openstreetmap.josm.data.osm.OsmPrimitive;
     14import org.openstreetmap.josm.data.osm.Relation;
    1515import org.openstreetmap.josm.data.osm.Tag;
     16import org.openstreetmap.josm.data.osm.Way;
    1617import org.openstreetmap.josm.data.validation.Severity;
    1718import org.openstreetmap.josm.data.validation.Test;
     
    9798    }
    9899
    99     private class DeprecationCheck {
     100    private static class DeprecationCheck {
    100101
    101102        int code;
     
    148149                String key = tag.getKey();
    149150                String value = tag.getValue();
    150                 if (value.isEmpty() && !p.hasKey(key)) {
     151                if (value.isEmpty() && !p.hasKey(key))
    151152                    return false;
    152                 }
    153                 if (!value.isEmpty() && !value.equals(p.get(key))) {
     153                if (!value.isEmpty() && !value.equals(p.get(key)))
    154154                    return false;
    155                 }
    156155            }
    157156            return true;
     
    167166
    168167        String getDescription() {
    169             if (alternatives.isEmpty()) {
     168            if (alternatives.isEmpty())
    170169                return tr("{0} is deprecated", Utils.join(", ", test));
    171             } else {
     170            else
    172171                return tr("{0} is deprecated, use {1} instead", Utils.join(", ", test), Utils.join(tr(" or "), alternatives));
    173             }
    174172        }
    175173    }
  • trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java

    r4869 r4874  
    3939public class DuplicateNode extends Test {
    4040
    41     private class NodeHash implements Hash<Object, Object> {
     41    private static class NodeHash implements Hash<Object, Object> {
    4242
    4343        double precision = Main.pref.getDouble("validator.duplicatenodes.precision", 0.);
  • trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateRelation.java

    r4869 r4874  
    3434{
    3535
    36     public class RelMember {
     36    public static class RelMember {
    3737        private String role;
    3838        private OsmPrimitiveType type;
  • trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateWay.java

    r4869 r4874  
    3434{
    3535
    36     private class WayPair {
     36    private static class WayPair {
    3737        public List<LatLon> coor;
    3838        public Map<String, String> keys;
     
    5656    }
    5757
    58     private class WayPairNoTags {
     58    private static class WayPairNoTags {
    5959        public List<LatLon> coor;
    6060        public WayPairNoTags(List<LatLon> _coor) {
  • trunk/src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java

    r4869 r4874  
    7070    }
    7171
    72     public class RoleInfo {
     72    public static class RoleInfo {
    7373        int total = 0;
    7474        Collection<Node> nodes = new LinkedList<Node>();
Note: See TracChangeset for help on using the changeset viewer.