001// License: GPL. For details, see LICENSE file. 002package org.openstreetmap.josm.data.osm; 003 004/** 005* interface to represent identification and type of the datatypes primitives. 006* 007* @since 2399 008*/ 009public interface PrimitiveId { 010 011 /** 012 * Gets a unique id representing this object (the OSM server id for OSM objects) 013 * 014 * @return the id number 015 */ 016 long getUniqueId(); 017 018 /** 019 * Gets the type of object represented by this object. Note that this should 020 * return the base primitive type ({@link OsmPrimitiveType#NODE}, 021 * {@link OsmPrimitiveType#WAY}, and {@link OsmPrimitiveType#RELATION}). 022 * 023 * @return the object type 024 * @see Node 025 * @see Way 026 * @see Relation 027 */ 028 OsmPrimitiveType getType(); 029 030 /** 031 * Replies true if this id represents a new primitive. 032 * 033 * @return true if this id represents a new primitive. 034 */ 035 boolean isNew(); 036 037}