Ignore:
Timestamp:
2009-11-08T15:19:50+01:00 (14 years ago)
Author:
jttt
Message:

Add clearId parameter to primitives copy constructor, replace some clearOsmId calls, throw exception if id is set after primitive was added to the dataset

File:
1 edited

Legend:

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

    r2407 r2410  
    149149
    150150    /**
    151      * Create an identical clone of the argument (including the id).
    152      *
    153      * @param original  the original way. Must not be null.
    154      */
    155     public Way(Way original) {
     151     *
     152     * @param original
     153     * @param clearId
     154     */
     155    public Way(Way original, boolean clearId) {
    156156        super(original.getUniqueId(), true);
    157157        cloneFrom(original);
     158        if (clearId) {
     159            clearOsmId();
     160        }
     161    }
     162
     163    /**
     164     * Create an identical clone of the argument (including the id).
     165     *
     166     * @param original  the original way. Must not be null.
     167     */
     168    public Way(Way original) {
     169        this(original, false);
    158170    }
    159171
Note: See TracChangeset for help on using the changeset viewer.