public class HistoryNode extends HistoryOsmPrimitive
Modifier and Type | Field and Description |
---|---|
private LatLon |
coords
the coordinates.
|
MAX_TAG_LENGTH
Constructor and Description |
---|
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 . |
Modifier and Type | Method and Description |
---|---|
NodeData |
fillPrimitiveData(NodeData data)
Fills the node attributes with values from this history.
|
LatLon |
getCoords()
Replies the coordinates.
|
java.lang.String |
getDisplayName(HistoryNameFormatter formatter)
Replies the display name of a primitive formatted by
formatter |
OsmPrimitiveType |
getType()
Returns the primitive type.
|
void |
setCoords(LatLon coords)
Sets the coordinates.
|
compareTo, ensurePositiveLong, equals, fillPrimitiveCommonData, forOsmPrimitive, get, getChangeset, getChangesetId, getId, getKeys, getLocalName, getName, getNumKeys, getPrimitiveId, getTags, getTimestamp, getUser, getVersion, hashCode, hasKey, hasKeys, isVisible, keySet, matches, matches, put, remove, removeAll, setChangeset, setKeys, setTags, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
hasTag, hasTag, hasTag, hasTag, hasTagDifferent, hasTagDifferent, hasTagDifferent, isKeyFalse, isKeyTrue, put, visitKeys
public HistoryNode(long id, long version, boolean visible, User user, long changesetId, java.util.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 coordinatesjava.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)
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 nodepublic OsmPrimitiveType getType()
HistoryOsmPrimitive
getType
in class HistoryOsmPrimitive
public final LatLon getCoords()
public final 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 namepublic NodeData fillPrimitiveData(NodeData data)
data
- node data to fill