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, version
MAX_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, visitReferrers
advanceUniqueId, 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, visitKeys
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
compareTo, getDisplayName, getRealNodesCount
getChangesetId, 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, visitReferrers
get, getKeys, getNumKeys, hasKey, hasKeys, hasTag, hasTag, hasTag, hasTag, hasTagDifferent, hasTagDifferent, hasTagDifferent, isKeyFalse, isKeyTrue, keySet, put, put, remove, removeAll, setKeys, visitKeys
getUniqueId, isNew
clearCachedStyle, declareCachedStyleUpToDate, getCachedStyle, isCachedStyleUpToDate, setCachedStyle
private 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()
IWay
public NodeData getNode(int index)
IWay
index
.public java.util.List<java.lang.Long> getNodeIds()
IWay
getNodeIds
in interface IWay<NodeData>
public int getNodesCount()
IWay
getNodesCount
in interface IWay<NodeData>
public long getNodeId(int idx)
IWay
public boolean isClosed()
IWay
public void setNodes(java.util.List<NodeData> nodes)
IWay
public void setNodeIds(java.util.List<java.lang.Long> nodes)
nodes
- The nodes this way consists ofpublic WayData makeCopy()
PrimitiveData
makeCopy
in class PrimitiveData
public java.lang.String toString()
toString
in class PrimitiveData
public OsmPrimitiveType getType()
PrimitiveId
getType
in interface PrimitiveId
Node
,
Way
,
Relation
public void accept(PrimitiveVisitor visitor)
IPrimitive
accept
in interface IPrimitive
visitor
- visitorpublic BBox getBBox()
IPrimitive
getBBox
in interface IPrimitive
public NodeData firstNode()
IWay
getNode
(0)
.public NodeData lastNode()
IWay
getNode
(getNodesCount
- 1)
.public boolean isFirstLastNode(INode n)
IWay
isFirstLastNode
in interface IWay<NodeData>
n
- The node to testn
is the first or the last node, false otherwise.public boolean isInnerNode(INode n)
IWay
isInnerNode
in interface IWay<NodeData>
n
- The node to testn
is an inner node, false otherwise.