public class HistoryNode extends HistoryOsmPrimitive
Constructor and Description |
---|
HistoryNode(long id,
long version,
boolean visible,
User user,
long changesetId,
Date timestamp,
LatLon coords)
Constructs a new
HistoryNode . |
HistoryNode(long id,
long version,
boolean visible,
User user,
long changesetId,
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 . |
Modifier and Type | Method and Description |
---|---|
LatLon |
getCoords()
Replies the coordinates.
|
String |
getDisplayName(HistoryNameFormatter formatter)
Replies the display name of a primitive formatted by
formatter |
OsmPrimitiveType |
getType() |
void |
setCoords(LatLon coords)
Sets the coordinates.
|
compareTo, ensurePositiveLong, equals, forOsmPrimitive, get, getChangeset, getChangesetId, getId, getLocalName, getName, getPrimitiveId, getTags, getTimestamp, getUser, getVersion, hashCode, hasTag, isVisible, matches, matches, put, setChangeset, setTags, toString
public HistoryNode(long id, long version, boolean visible, User user, long changesetId, Date timestamp, LatLon coords)
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 coordinatesIllegalArgumentException
- if preconditions are violatedpublic HistoryNode(long id, long version, boolean visible, User user, long changesetId, Date timestamp, LatLon coords, boolean checkHistoricParams)
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
IllegalArgumentException
- if preconditions are violatedpublic HistoryNode(Node n)
HistoryNode
from an existing Node
.n
- the nodepublic OsmPrimitiveType getType()
getType
in class HistoryOsmPrimitive
public final LatLon getCoords()
public final void setCoords(LatLon coords)
coords
- the coordinates. Can be null.public String getDisplayName(HistoryNameFormatter formatter)
HistoryOsmPrimitive
formatter
getDisplayName
in class HistoryOsmPrimitive
formatter
- The formatter used to generate a display name