Changeset 13914 in josm


Ignore:
Timestamp:
2018-06-11T01:21:41+02:00 (10 months ago)
Author:
Don-vip
Message:

move getPrimitiveById() default implementation from DataSet to OsmData

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

Legend:

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

    r13829 r13914  
    776776
    777777    @Override
    778     public OsmPrimitive getPrimitiveById(long id, OsmPrimitiveType type) {
    779         return getPrimitiveById(new SimplePrimitiveId(id, type));
    780     }
    781 
    782     @Override
    783778    public OsmPrimitive getPrimitiveById(PrimitiveId primitiveId) {
    784779        return primitiveId != null ? primitivesMap.get(primitiveId) : null;
  • trunk/src/org/openstreetmap/josm/data/osm/OsmData.java

    r13766 r13914  
    115115     * @throws NullPointerException if type is null
    116116     */
    117     O getPrimitiveById(long id, OsmPrimitiveType type);
     117    default O getPrimitiveById(long id, OsmPrimitiveType type) {
     118        return getPrimitiveById(new SimplePrimitiveId(id, type));
     119    }
    118120
    119121    /**
Note: See TracChangeset for help on using the changeset viewer.