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


Ignore:
Timestamp:
2016-01-22T01:47:49+01:00 (9 years ago)
Author:
Don-vip
Message:

see #12300 - add javadoc, unit tests

Location:
trunk/src/org/openstreetmap/josm/gui/datatransfer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/datatransfer/PrimitiveTransferable.java

    r9369 r9563  
    1212import org.openstreetmap.josm.gui.DefaultNameFormatter;
    1313
     14/**
     15 * Transferable objects for {@link PrimitiveData}.
     16 * @since 9369
     17 */
    1418public class PrimitiveTransferable implements Transferable {
    1519
     20    /**
     21     * Data flavor for {@link PrimitiveData}.
     22     */
    1623    public static final DataFlavor PRIMITIVE_DATA = new DataFlavor(PrimitiveData.class, PrimitiveData.class.getName());
    17     private final Collection<OsmPrimitive> primitives;
     24    private final Collection<? extends OsmPrimitive> primitives;
    1825
    19     public PrimitiveTransferable(Collection<OsmPrimitive> members) {
    20         this.primitives = members;
     26    /**
     27     * Constructs a new {@code PrimitiveTransferable}.
     28     * @param primitives collection of OSM primitives
     29     */
     30    public PrimitiveTransferable(Collection<? extends OsmPrimitive> primitives) {
     31        this.primitives = primitives;
    2132    }
    2233
  • trunk/src/org/openstreetmap/josm/gui/datatransfer/RelationMemberTransferable.java

    r9368 r9563  
    1212import org.openstreetmap.josm.gui.DefaultNameFormatter;
    1313
     14/**
     15 * Transferable objects for {@link RelationMemberData}.
     16 * @since 9368
     17 */
    1418public class RelationMemberTransferable implements Transferable {
    1519
     20    /**
     21     * Data flavor for {@link RelationMemberData}.
     22     */
    1623    public static final DataFlavor RELATION_MEMBER_DATA = new DataFlavor(RelationMemberData.class, RelationMemberData.class.getName());
    1724    private final Collection<RelationMember> members;
    1825
     26    /**
     27     * Constructs a new {@code RelationMemberTransferable}.
     28     * @param members list of relation members
     29     */
    1930    public RelationMemberTransferable(Collection<RelationMember> members) {
    2031        this.members = members;
Note: See TracChangeset for help on using the changeset viewer.