Changeset 7961 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2015-01-12T23:08:49+01:00 (5 years ago)
Author:
Don-vip
Message:

signature change to allow better flexibility for plugins

File:
1 edited

Legend:

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

    r7005 r7961  
    1414 * This class allows to create and keep a deep copy of primitives. Provides methods to access directly added
    1515 * primitives and reference primitives
    16  *
     16 * @since 2305
    1717 */
    1818public class PrimitiveDeepCopy {
     
    2626    private final CopyOnWriteArrayList<PasteBufferChangedListener> listeners = new CopyOnWriteArrayList<>();
    2727
     28    /**
     29     * Constructs a new {@code PrimitiveDeepCopy} without data. Use {@link #makeCopy(Collection)} after that.
     30     */
    2831    public PrimitiveDeepCopy() {
    29 
     32        // Do nothing
    3033    }
    3134
    32     public PrimitiveDeepCopy(final Collection<OsmPrimitive> primitives) {
     35    /**
     36     * Constructs a new {@code PrimitiveDeepCopy} of given OSM primitives.
     37     * @param primitives OSM primitives to copy
     38     * @since 7961
     39     */
     40    public PrimitiveDeepCopy(final Collection<? extends OsmPrimitive> primitives) {
    3341        makeCopy(primitives);
    3442    }
    3543
    3644    /**
    37      * Replace content of the object with copy of provided primitives
    38      * @param primitives
     45     * Replace content of the object with copy of provided primitives.
     46     * @param primitives OSM primitives to copy
     47     * @since 7961
    3948     */
    40     public final void makeCopy(final Collection<OsmPrimitive> primitives) {
     49    public final void makeCopy(final Collection<? extends OsmPrimitive> primitives) {
    4150        directlyAdded.clear();
    4251        referenced.clear();
     
    119128        listeners.remove(listener);
    120129    }
    121 
    122130}
Note: See TracChangeset for help on using the changeset viewer.