Class Multipolygon.JoinedWay
- java.lang.Object
-
- org.openstreetmap.josm.data.osm.visitor.paint.relations.Multipolygon.JoinedWay
-
- Direct Known Subclasses:
Multipolygon.PolyData
- Enclosing class:
- Multipolygon
public static class Multipolygon.JoinedWay extends Object
Class representing a string of ways. The last node of one way is the first way of the next one. The string may or may not be closed.
-
-
Constructor Summary
Constructors Constructor Description JoinedWay(List<Node> nodes, Collection<Long> wayIds, boolean selected)
Constructs a newJoinedWay
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Node
getFirstNode()
Returns the first node.Node
getLastNode()
Returns the last node.List<Node>
getNodes()
Replies the list of nodes.Collection<Long>
getWayIds()
Replies the list of way IDs.boolean
isClosed()
Determines if this joined way is closed.boolean
isSelected()
Determines if this is selected.void
setSelected(boolean selected)
Sets whether this is selected
-
-
-
Constructor Detail
-
JoinedWay
public JoinedWay(List<Node> nodes, Collection<Long> wayIds, boolean selected)
Constructs a newJoinedWay
.- Parameters:
nodes
- list of nodes - must not be nullwayIds
- list of way IDs - must not be nullselected
- whether joined way is selected or not
-
-
Method Detail
-
getWayIds
public Collection<Long> getWayIds()
Replies the list of way IDs.- Returns:
- the list of way IDs
-
isSelected
public final boolean isSelected()
Determines if this is selected.- Returns:
true
if this is selected
-
setSelected
public final void setSelected(boolean selected)
Sets whether this is selected- Parameters:
selected
-true
if this is selected- Since:
- 10312
-
isClosed
public boolean isClosed()
Determines if this joined way is closed.- Returns:
true
if this joined way is closed
-
getFirstNode
public Node getFirstNode()
Returns the first node.- Returns:
- the first node
- Since:
- 10312
-
getLastNode
public Node getLastNode()
Returns the last node.- Returns:
- the last node
- Since:
- 10312
-
-