public class HistoryNode extends HistoryOsmPrimitive
| 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 |
|---|---|
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.
|
compareTo, ensurePositiveLong, equals, forOsmPrimitive, get, getChangeset, getChangesetId, getId, getLocalName, getName, getPrimitiveId, getTags, getTimestamp, getUser, getVersion, hashCode, hasTag, isVisible, matches, matches, put, setChangeset, setTags, toStringpublic 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 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) 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 timestampjava.lang.IllegalArgumentException - if preconditions are violatedpublic HistoryNode(Node n)
HistoryNode from an existing Node.n - the nodepublic OsmPrimitiveType getType()
getType in class HistoryOsmPrimitivepublic final LatLon getCoords()
public final void setCoords(LatLon coords)
coords - the coordinates. Can be null.public java.lang.String getDisplayName(HistoryNameFormatter formatter)
HistoryOsmPrimitiveformattergetDisplayName in class HistoryOsmPrimitiveformatter - The formatter used to generate a display name