N
- type of OSM nodepublic interface IWay<N extends INode> extends IPrimitive
MAX_TAG_LENGTH
Modifier and Type | Method and Description |
---|---|
default int |
compareTo(IPrimitive o) |
N |
firstNode()
Returns the first node of this way.
|
default java.lang.String |
getDisplayName(NameFormatter formatter)
Replies the display name of a primitive formatted by
formatter |
N |
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<N> |
getNodes()
Returns the list of nodes in this way.
|
int |
getNodesCount()
Replies the number of nodes in this way.
|
default int |
getRealNodesCount()
Replies the real number of nodes in this way (full number of nodes minus one if this way is closed)
|
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.
|
N |
lastNode()
Returns the last node of this way.
|
void |
setNodes(java.util.List<N> nodes)
Set new list of nodes to way.
|
accept, getBBox, 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
getType, getUniqueId, isNew
clearCachedStyle, declareCachedStyleUpToDate, getCachedStyle, isCachedStyleUpToDate, setCachedStyle
int getNodesCount()
default int getRealNodesCount()
getNodesCount()
,
isClosed()
N getNode(int index)
index
.index
- the positionindex
java.lang.ArrayIndexOutOfBoundsException
- if index
< 0
or index
>= getNodesCount()
java.util.List<N> getNodes()
java.util.List<java.lang.Long> getNodeIds()
long getNodeId(int idx)
idx
- node indexvoid setNodes(java.util.List<N> nodes)
nodes
- New way nodes. Can be null, in that case all way nodes are removedboolean isClosed()
true
if this way is closed, false
otherwisedefault int compareTo(IPrimitive o)
compareTo
in interface java.lang.Comparable<IPrimitive>
default java.lang.String getDisplayName(NameFormatter formatter)
IPrimitive
formatter
getDisplayName
in interface IPrimitive
formatter
- formatter to useN firstNode()
getNode
(0)
.N lastNode()
getNode
(getNodesCount
- 1)
.boolean isFirstLastNode(INode n)
n
- The node to testn
is the first or the last node, false otherwise.boolean isInnerNode(INode n)
n
- The node to testn
is an inner node, false otherwise.