public class SimplePrimitiveId extends Object implements PrimitiveId, Serializable
| Modifier and Type | Field and Description |
|---|---|
private long |
id |
private OsmPrimitiveType |
type |
| Constructor and Description |
|---|
SimplePrimitiveId(long id,
OsmPrimitiveType type) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
static SimplePrimitiveId |
fromString(String s)
Parses a
OsmPrimitiveType from the string s. |
OsmPrimitiveType |
getType()
Gets the type of object represented by this object.
|
long |
getUniqueId()
Gets a unique id representing this object (the OSM server id for OSM objects)
|
int |
hashCode() |
boolean |
isNew()
Replies true if this id represents a new primitive.
|
String |
toString() |
private final long id
private final OsmPrimitiveType type
public SimplePrimitiveId(long id, OsmPrimitiveType type)
public OsmPrimitiveType getType()
PrimitiveIdgetType in interface PrimitiveIdNode,
Way,
Relationpublic long getUniqueId()
PrimitiveIdgetUniqueId in interface PrimitiveIdpublic boolean isNew()
PrimitiveIdisNew in interface PrimitiveIdpublic static SimplePrimitiveId fromString(String s)
OsmPrimitiveType from the string s.s - the string to be parsed, e.g., n1, node1,
w1, way1, r1, rel1, relation1.OsmPrimitiveTypeIllegalArgumentException - if the string does not match the pattern