Ignore:
Timestamp:
2016-07-10T20:44:13+02:00 (9 years ago)
Author:
donvip
Message:

checkstyle

Location:
applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/FullGraphCreationTest.java

    r30737 r32620  
     1// License: GPL. For details, see LICENSE file.
    12package org.openstreetmap.josm.plugins.graphview.core;
    23
     
    45
    56import java.util.Arrays;
     7import java.util.Collection;
    68import java.util.HashMap;
    79import java.util.Iterator;
    810import java.util.LinkedList;
     11import java.util.List;
    912import java.util.Map;
    1013
     
    4952
    5053    private static final AccessRuleset TEST_RULESET = new AccessRuleset() {
     54        @Override
    5155        public java.util.List<String> getAccessHierarchyAncestors(String transportMode) {
    5256            return Arrays.asList(transportMode);
    5357        }
    54         public java.util.Collection<Tag> getBaseTags() {
     58
     59        @Override
     60        public Collection<Tag> getBaseTags() {
    5561            return Arrays.asList(new Tag("highway", "test"));
    5662        }
    57         public java.util.List<Implication> getImplications() {
     63
     64        @Override
     65        public List<Implication> getImplications() {
    5866            return new LinkedList<>();
    5967        }
     
    174182        while (iterator.hasNext()) {
    175183            iterator.next();
    176             size ++;
     184            size++;
    177185        }
    178186        return size;
  • applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/TestDataSource.java

    r30737 r32620  
     1// License: GPL. For details, see LICENSE file.
    12package org.openstreetmap.josm.plugins.graphview.core;
    23
     
    1213import org.openstreetmap.josm.plugins.graphview.core.data.TagGroup;
    1314
    14 public class TestDataSource implements DataSource<TestDataSource.TestNode, TestDataSource.TestWay, TestDataSource.TestRelation, TestDataSource.TestRelationMember> {
     15public class TestDataSource
     16implements DataSource<TestDataSource.TestNode, TestDataSource.TestWay, TestDataSource.TestRelation, TestDataSource.TestRelationMember> {
    1517
    1618    public static class TestPrimitive {
    1719        public final Map<String, String> tags = new HashMap<>();
    18     };
     20    }
    1921
    2022    public static class TestNode extends TestPrimitive {
     
    2426            this(0, 0);
    2527        }
     28
    2629        public TestNode(double lat, double lon) {
    2730            this.lat = lat;
    2831            this.lon = lon;
    2932        }
     33
    3034        @Override
    3135        public String toString() {
     
    5761            this.member = member;
    5862        }
     63
    5964        public TestPrimitive getMember() {
    6065            return member;
    6166        }
     67
    6268        public String getRole() {
    6369            return role;
    6470        }
     71
    6572        @Override
    6673        public String toString() {
     
    7481    public final Collection<TestRelation> relations = new LinkedList<>();
    7582
    76 
     83    @Override
    7784    public double getLat(TestNode node) {
    7885        return node.lat;
    7986    }
     87
     88    @Override
    8089    public double getLon(TestNode node) {
    8190        return node.lon;
    8291    }
    8392
     93    @Override
    8494    public Iterable<TestRelationMember> getMembers(TestRelation relation) {
    8595        return relation.members;
    8696    }
    8797
     98    @Override
    8899    public Iterable<TestNode> getNodes() {
    89100        return nodes;
    90101    }
    91102
     103    @Override
    92104    public Iterable<TestNode> getNodes(TestWay way) {
    93105        return way.nodes;
    94106    }
    95107
     108    @Override
    96109    public Iterable<TestWay> getWays() {
    97110        return ways;
    98111    }
    99112
     113    @Override
    100114    public Iterable<TestRelation> getRelations() {
    101115        return relations;
    102116    }
    103117
     118    @Override
    104119    public TagGroup getTagsN(TestNode node) {
    105120        return new MapBasedTagGroup(node.tags);
    106121    }
    107122
     123    @Override
    108124    public TagGroup getTagsW(TestWay way) {
    109125        return new MapBasedTagGroup(way.tags);
    110126    }
    111127
     128    @Override
    112129    public TagGroup getTagsR(TestRelation relation) {
    113130        return new MapBasedTagGroup(relation.tags);
    114131    }
    115132
     133    @Override
    116134    public Object getMember(TestRelationMember member) {
    117135        return member.getMember();
    118136    }
    119137
     138    @Override
    120139    public String getRole(TestRelationMember member) {
    121140        return member.getRole();
    122141    }
    123142
     143    @Override
    124144    public boolean isNMember(TestRelationMember member) {
    125145        return member.getMember() instanceof TestNode;
    126146    }
    127147
     148    @Override
    128149    public boolean isWMember(TestRelationMember member) {
    129150        return member.getMember() instanceof TestWay;
    130151    }
    131152
     153    @Override
    132154    public boolean isRMember(TestRelationMember member) {
    133155        return member.getMember() instanceof TestRelation;
    134156    }
    135157
     158    @Override
    136159    public void addObserver(DataSourceObserver observer) {
    137160        // not needed for test
    138161    }
    139162
     163    @Override
    140164    public void deleteObserver(DataSourceObserver observer) {
    141165        // not needed for test
  • applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/access/AccessRulesetReaderTest.java

    r30737 r32620  
     1// License: GPL. For details, see LICENSE file.
    12package org.openstreetmap.josm.plugins.graphview.core.access;
    23
  • applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/property/RoadInclineTest.java

    r23189 r32620  
     1// License: GPL. For details, see LICENSE file.
    12package org.openstreetmap.josm.plugins.graphview.core.property;
    23
  • applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/property/RoadMaxspeedTest.java

    r23189 r32620  
     1// License: GPL. For details, see LICENSE file.
    12package org.openstreetmap.josm.plugins.graphview.core.property;
    23
     
    78
    89    private static void testMaxspeed(float expectedMaxspeed, String maxspeedString) {
    9         testEvaluateBoth(new RoadMaxspeed(),    expectedMaxspeed, new Tag("maxspeed", maxspeedString));
     10        testEvaluateBoth(new RoadMaxspeed(), expectedMaxspeed, new Tag("maxspeed", maxspeedString));
    1011    }
    1112
     
    2930        testMaxspeed(24.14016f, "15 mph");
    3031    }
    31 
    3232}
  • applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/property/RoadPropertyTest.java

    r30560 r32620  
     1// License: GPL. For details, see LICENSE file.
    12package org.openstreetmap.josm.plugins.graphview.core.property;
    23
     
    89
    910@Ignore("no test")
    10 abstract public class RoadPropertyTest {
     11public abstract class RoadPropertyTest {
    1112
    1213    protected static <P> void testEvaluateW(RoadPropertyType<P> property, P expectedForward, P expectedBackward, Tag... wayTags) {
  • applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/util/TagConditionLogicTest.java

    r30737 r32620  
     1// License: GPL. For details, see LICENSE file.
    12package org.openstreetmap.josm.plugins.graphview.core.util;
    23import static org.junit.Assert.assertFalse;
  • applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/util/ValueStringParserTest.java

    r30550 r32620  
     1// License: GPL. For details, see LICENSE file.
    12package org.openstreetmap.josm.plugins.graphview.core.util;
    23
     
    8889    }
    8990
    90     private static final void assertClose(float expected, float actual) {
     91    private static void assertClose(float expected, float actual) {
    9192        if (Math.abs(expected - actual) > 0.001) {
    9293            throw new AssertionError("expected " + expected + ", was " + actual);
  • applications/editors/josm/plugins/graphview/test/unit/org/openstreetmap/josm/plugins/graphview/core/visualisation/FloatPropertyColorSchemeTest.java

    r30737 r32620  
     1// License: GPL. For details, see LICENSE file.
    12package org.openstreetmap.josm.plugins.graphview.core.visualisation;
    23
Note: See TracChangeset for help on using the changeset viewer.