Changeset 12017 in josm


Ignore:
Timestamp:
2017-04-29T16:23:41+02:00 (7 years ago)
Author:
Don-vip
Message:

*Data: new constructors with a given id

Location:
trunk/src/org/openstreetmap/josm/data/osm
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/NodeData.java

    r9891 r12017  
    2121    public NodeData() {
    2222        // contents can be set later with setters
     23    }
     24
     25    /**
     26     * Constructs a new {@code NodeData} with given id.
     27     * @param id id
     28     * @since 12017
     29     */
     30    public NodeData(long id) {
     31        super(id);
    2332    }
    2433
  • trunk/src/org/openstreetmap/josm/data/osm/PrimitiveData.java

    r11878 r12017  
    2727     */
    2828    public PrimitiveData() {
    29         id = OsmPrimitive.generateUniqueId();
     29        this(OsmPrimitive.generateUniqueId());
     30    }
     31
     32    /**
     33     * Constructs a new {@code PrimitiveData} with given id.
     34     * @param id id
     35     * @since 12017
     36     */
     37    public PrimitiveData(long id) {
     38        this.id = id;
    3039    }
    3140
  • trunk/src/org/openstreetmap/josm/data/osm/RelationData.java

    r11878 r12017  
    2121    public RelationData() {
    2222        // contents can be set later with setters
     23    }
     24
     25    /**
     26     * Constructs a new {@code RelationData} with given id.
     27     * @param id id
     28     * @since 12017
     29     */
     30    public RelationData(long id) {
     31        super(id);
    2332    }
    2433
  • trunk/src/org/openstreetmap/josm/data/osm/WayData.java

    r9891 r12017  
    1717    public WayData() {
    1818        // contents can be set later with setters
     19    }
     20
     21    /**
     22     * Constructs a new {@code WayData} with given id.
     23     * @param id id
     24     * @since 12017
     25     */
     26    public WayData(long id) {
     27        super(id);
    1928    }
    2029
Note: See TracChangeset for help on using the changeset viewer.