|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openstreetmap.josm.data.osm.history.HistoryOsmPrimitive
org.openstreetmap.josm.data.osm.history.HistoryNode
public class HistoryNode
Represents an immutable OSM node in the context of a historical view on OSM data.
Field Summary | |
---|---|
private LatLon |
coords
the coordinates. |
Constructor Summary | |
---|---|
HistoryNode(long id,
long version,
boolean visible,
User user,
long changesetId,
java.util.Date timestamp,
LatLon coords)
Constructs a new HistoryNode . |
|
HistoryNode(long id,
long version,
boolean visible,
User user,
long changesetId,
java.util.Date timestamp,
LatLon coords,
boolean checkHistoricParams)
Constructs a new HistoryNode with a configurable checking of historic parameters. |
|
HistoryNode(Node n)
Constructs a new HistoryNode from an existing Node . |
Method Summary | |
---|---|
LatLon |
getCoords()
Replies the coordinates. |
java.lang.String |
getDisplayName(HistoryNameFormatter formatter)
Replies the display name of a primitive formatted by formatter |
OsmPrimitiveType |
getType()
|
void |
setCoords(LatLon coords)
Sets the coordinates. |
Methods inherited from class org.openstreetmap.josm.data.osm.history.HistoryOsmPrimitive |
---|
compareTo, ensurePositiveLong, equals, forOsmPrimitive, get, getChangesetId, getId, getLocalName, getName, getPrimitiveId, getTags, getTimestamp, getUser, getVersion, hashCode, hasTag, isVisible, matches, matches, put, setTags, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private LatLon coords
Constructor Detail |
---|
public HistoryNode(long id, long version, boolean visible, User user, long changesetId, java.util.Date timestamp, LatLon coords) throws java.lang.IllegalArgumentException
HistoryNode
.
id
- the id (> 0 required)version
- the version (> 0 required)visible
- whether the node is still visibleuser
- the user (! null required)changesetId
- the changeset id (> 0 required)timestamp
- the timestamp (! null required)coords
- the coordinates
java.lang.IllegalArgumentException
- if preconditions are violatedpublic HistoryNode(long id, long version, boolean visible, User user, long changesetId, java.util.Date timestamp, LatLon coords, boolean checkHistoricParams) throws java.lang.IllegalArgumentException
HistoryNode
with a configurable checking of historic parameters.
This is needed to build virtual HistoryNodes for modified nodes, which do not have a timestamp and a changeset id.
id
- the id (> 0 required)version
- the version (> 0 required)visible
- whether the node is still visibleuser
- the user (! null required)changesetId
- the changeset id (> 0 required if checkHistoricParams
is true)timestamp
- the timestamp (! null required if checkHistoricParams
is true)coords
- the coordinatescheckHistoricParams
- if true, checks values of changesetId
and timestamp
java.lang.IllegalArgumentException
- if preconditions are violatedpublic HistoryNode(Node n)
HistoryNode
from an existing Node
.
n
- the nodeMethod Detail |
---|
public OsmPrimitiveType getType()
getType
in class HistoryOsmPrimitive
public LatLon getCoords()
public void setCoords(LatLon coords)
coords
- the coordinates. Can be null.public java.lang.String getDisplayName(HistoryNameFormatter formatter)
HistoryOsmPrimitive
formatter
getDisplayName
in class HistoryOsmPrimitive
formatter
- The formatter used to generate a display name
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |