- Timestamp:
- 2015-01-12T23:08:49+01:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/PrimitiveDeepCopy.java
r7005 r7961 14 14 * This class allows to create and keep a deep copy of primitives. Provides methods to access directly added 15 15 * primitives and reference primitives 16 * 16 * @since 2305 17 17 */ 18 18 public class PrimitiveDeepCopy { … … 26 26 private final CopyOnWriteArrayList<PasteBufferChangedListener> listeners = new CopyOnWriteArrayList<>(); 27 27 28 /** 29 * Constructs a new {@code PrimitiveDeepCopy} without data. Use {@link #makeCopy(Collection)} after that. 30 */ 28 31 public PrimitiveDeepCopy() { 29 32 // Do nothing 30 33 } 31 34 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) { 33 41 makeCopy(primitives); 34 42 } 35 43 36 44 /** 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 39 48 */ 40 public final void makeCopy(final Collection< OsmPrimitive> primitives) {49 public final void makeCopy(final Collection<? extends OsmPrimitive> primitives) { 41 50 directlyAdded.clear(); 42 51 referenced.clear(); … … 119 128 listeners.remove(listener); 120 129 } 121 122 130 }
Note:
See TracChangeset
for help on using the changeset viewer.