public class WayData extends PrimitiveData implements IWay<NodeData>
| Modifier and Type | Field and Description |
|---|---|
private java.util.List<java.lang.Long> |
nodes |
private static long |
serialVersionUID |
changesetId, FLAG_ANNOTATED, FLAG_DELETED, FLAG_DIRECTION_REVERSED, FLAG_DISABLED, FLAG_DISABLED_TYPE, FLAG_HAS_DIRECTIONS, FLAG_HIDDEN_TYPE, FLAG_HIDE_IF_DISABLED, FLAG_HIGHLIGHTED, FLAG_INCOMPLETE, FLAG_MODIFIED, FLAG_PRESERVED, FLAG_TAGGED, FLAG_VISIBLE, flags, id, keys, timestamp, user, versionMAX_TAG_LENGTH| Constructor and Description |
|---|
WayData()
Constructs a new
NodeData. |
WayData(long id)
Constructs a new
WayData with given id. |
WayData(WayData data)
Constructs a new
WayData. |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(PrimitiveVisitor visitor)
Makes the given visitor visit this primitive.
|
NodeData |
firstNode()
Returns the first node of this way.
|
BBox |
getBBox()
Fetches the bounding box of the primitive.
|
NodeData |
getNode(int index)
Replies the node at position
index. |
long |
getNodeId(int idx)
Returns id of the node at given index.
|
java.util.List<java.lang.Long> |
getNodeIds()
Returns the list of node ids in this way.
|
java.util.List<NodeData> |
getNodes()
Returns the list of nodes in this way.
|
int |
getNodesCount()
Replies the number of nodes in this way.
|
OsmPrimitiveType |
getType()
Gets the type of object represented by this object.
|
boolean |
isClosed()
Determines if this way is closed.
|
boolean |
isFirstLastNode(INode n)
Replies true if the given node is the first or the last one of this way, false otherwise.
|
boolean |
isInnerNode(INode n)
Replies true if the given node is an inner node of this way, false otherwise.
|
NodeData |
lastNode()
Returns the last node of this way.
|
WayData |
makeCopy()
Returns a copy of this primitive data.
|
void |
setNodeIds(java.util.List<java.lang.Long> nodes)
Sets the nodes array
|
void |
setNodes(java.util.List<NodeData> nodes)
Set new list of nodes to way.
|
java.lang.String |
toString() |
declareCachedStyleUpToDate, getCachedStyle, getDataSet, getFilteredList, getReferrers, hasDirectionKeys, isAnnotated, isCachedStyleUpToDate, isHighlighted, isTagged, keysChangedImpl, reversedDirection, setCachedStyle, setHighlighted, setId, setIncomplete, setVersion, visitReferrersadvanceUniqueId, clearOsmMetadata, cloneFrom, currentUniqueId, doGet, generateUniqueId, get, getChangesetId, getDiscardableKeys, getFlagsAsString, getId, getIgnoreCase, getInterestingTags, getKeys, getNumKeys, getRawTimestamp, getTimestamp, getUninterestingKeys, getUniqueId, getUser, getVersion, getWorkInProgressKeys, hasKey, hasKey, hasKeys, isDeleted, isIncomplete, isModified, isNew, isNewOrUndeleted, isTimestampEmpty, isUndeleted, isUninterestingKey, isUsable, isVisible, keySet, put, remove, removeAll, setChangesetId, setDeleted, setKeys, setKeys, setModified, setOsmId, setRawTimestamp, setTimestamp, setUser, setVisible, updateFlags, visitKeysclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcompareTo, getDisplayName, getRealNodesCountgetChangesetId, getDataSet, getDisplayType, getId, getInterestingTags, getLocalName, getName, getOsmId, getOsmPrimitiveId, getPrimitiveId, getRawTimestamp, getReferrers, getReferrers, getTimestamp, getUser, getVersion, hasDirectionKeys, hasSameInterestingTags, isAnnotated, isDeleted, isDisabled, isDisabledAndHidden, isDrawable, isHighlighted, isIncomplete, isMemberOfSelected, isModified, isMultipolygon, isNewOrUndeleted, isOuterMemberOfSelected, isPreserved, isSelectable, isSelected, isTagged, isTimestampEmpty, isUndeleted, isUsable, isVisible, reversedDirection, setChangesetId, setDeleted, setHighlighted, setModified, setOsmId, setRawTimestamp, setTimestamp, setUser, setVisible, visitReferrersget, getKeys, getNumKeys, hasKey, hasKeys, hasTag, hasTag, hasTag, hasTag, hasTagDifferent, hasTagDifferent, hasTagDifferent, isKeyFalse, isKeyTrue, keySet, put, put, remove, removeAll, setKeys, visitKeysgetUniqueId, isNewclearCachedStyle, declareCachedStyleUpToDate, getCachedStyle, isCachedStyleUpToDate, setCachedStyleprivate static final long serialVersionUID
private java.util.List<java.lang.Long> nodes
public WayData()
NodeData.public WayData(long id)
WayData with given id.id - idpublic java.util.List<NodeData> getNodes()
IWaypublic NodeData getNode(int index)
IWayindex.public java.util.List<java.lang.Long> getNodeIds()
IWaygetNodeIds in interface IWay<NodeData>public int getNodesCount()
IWaygetNodesCount in interface IWay<NodeData>public long getNodeId(int idx)
IWaypublic boolean isClosed()
IWaypublic void setNodes(java.util.List<NodeData> nodes)
IWaypublic void setNodeIds(java.util.List<java.lang.Long> nodes)
nodes - The nodes this way consists ofpublic WayData makeCopy()
PrimitiveDatamakeCopy in class PrimitiveDatapublic java.lang.String toString()
toString in class PrimitiveDatapublic OsmPrimitiveType getType()
PrimitiveIdgetType in interface PrimitiveIdNode,
Way,
Relationpublic void accept(PrimitiveVisitor visitor)
IPrimitiveaccept in interface IPrimitivevisitor - visitorpublic BBox getBBox()
IPrimitivegetBBox in interface IPrimitivepublic NodeData firstNode()
IWaygetNode(0).public NodeData lastNode()
IWaygetNode(getNodesCount - 1).public boolean isFirstLastNode(INode n)
IWayisFirstLastNode in interface IWay<NodeData>n - The node to testn is the first or the last node, false otherwise.public boolean isInnerNode(INode n)
IWayisInnerNode in interface IWay<NodeData>n - The node to testn is an inner node, false otherwise.