Ignore:
Timestamp:
2016-04-09T17:07:54+02:00 (4 years ago)
Author:
Don-vip
Message:

refactor classes from corrector package, add javadoc

Location:
trunk/src/org/openstreetmap/josm/data/correction
Files:
2 added
3 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/correction/Correction.java

    r10113 r10125  
    11// License: GPL. For details, see LICENSE file.
    2 package org.openstreetmap.josm.corrector;
     2package org.openstreetmap.josm.data.correction;
    33
     4/**
     5 * Data correction. Represents any change.
     6 * @since 1001
     7 */
    48public interface Correction {
    59
  • trunk/src/org/openstreetmap/josm/data/correction/RoleCorrection.java

    r10113 r10125  
    11// License: GPL. For details, see LICENSE file.
    2 package org.openstreetmap.josm.corrector;
     2package org.openstreetmap.josm.data.correction;
    33
    44import org.openstreetmap.josm.data.osm.Relation;
    55import org.openstreetmap.josm.data.osm.RelationMember;
    66
     7/**
     8 * Represents a change of a single {@link RelationMember} role.
     9 * @since 1001
     10 */
    711public class RoleCorrection implements Correction {
    812
     13    /** OSM relation */
    914    public final Relation relation;
     15    /** Relation member index */
    1016    public final int position;
     17    /** Relation member */
    1118    public final RelationMember member;
     19    /** New role */
    1220    public final String newRole;
    1321
    14     public RoleCorrection(Relation relation, int position,
    15                           RelationMember member, String newRole) {
     22    /**
     23     * Constructs a new {@code RoleCorrection}.
     24     * @param relation OSM relation
     25     * @param position relation member index
     26     * @param member relation member
     27     * @param newRole new role
     28     */
     29    public RoleCorrection(Relation relation, int position, RelationMember member, String newRole) {
    1630        this.relation = relation;
    1731        this.position = position;
  • trunk/src/org/openstreetmap/josm/data/correction/TagCorrection.java

    r10113 r10125  
    11// License: GPL. For details, see LICENSE file.
    2 package org.openstreetmap.josm.corrector;
     2package org.openstreetmap.josm.data.correction;
    33
    44/**
    5  * TagCorrection reprepresents a change of a single
    6  * tag. Both key and value can be subject of this change.
     5 * Represents a change of a single tag.
     6 * Both key and value can be subject of this change.
     7 * @since 729
    78 */
    89public class TagCorrection implements Correction {
    910
     11    /** Old key */
    1012    public final String oldKey;
     13    /** New key */
    1114    public final String newKey;
     15    /** Old value */
    1216    public final String oldValue;
     17    /** New value */
    1318    public final String newValue;
    1419
    15     public TagCorrection(String oldKey, String oldValue, String newKey,
    16             String newValue) {
     20    /**
     21     * Constructs a new {@code TagCorrection}.
     22     * @param oldKey old key
     23     * @param oldValue old value
     24     * @param newKey new key
     25     * @param newValue new value
     26     */
     27    public TagCorrection(String oldKey, String oldValue, String newKey, String newValue) {
    1728        this.oldKey = oldKey;
    1829        this.oldValue = oldValue;
     
    2132    }
    2233
     34    /**
     35     * Determines if the key has changed.
     36     * @return {@code true} if the key has changed
     37     */
    2338    public boolean isKeyChanged() {
    2439        return !newKey.equals(oldKey);
    2540    }
    2641
     42    /**
     43     * Determines if the value has changed.
     44     * @return {@code true} if the value has changed
     45     */
    2746    public boolean isValueChanged() {
    2847        return !newValue.equals(oldValue);
Note: See TracChangeset for help on using the changeset viewer.