001 // License: GPL. For details, see LICENSE file.
002 package org.openstreetmap.josm.data.osm;
003
004 /**
005 * interface to represent identifaction and type of the datatypes primitives.
006 *
007 * @since 2399
008 */
009 public 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.
020 *
021 * @see Node
022 * @see Way
023 * @see Relation
024 * @return the object type
025 */
026 OsmPrimitiveType getType();
027
028 /**
029 * Replies true if this id represents a new primitive.
030 *
031 * @return true if this id represents a new primitive.
032 */
033 boolean isNew();
034
035 }