Class WayConnectionType
- java.lang.Object
-
- org.openstreetmap.josm.gui.dialogs.relation.sort.WayConnectionType
-
public class WayConnectionType extends Object
A class used by theRelationSorter
to store if two ways are already connected
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
WayConnectionType.Direction
-
Field Summary
Fields Modifier and Type Field Description WayConnectionType.Direction
direction
direction is FORWARD if the first node of this way is connected to the previous way and / or the last node of this way is connected to the next way.boolean
ignoreOneway
True, if all oneway features are ignoredprivate boolean
invalid
True, if the corresponding primitive is not a way or the way is incompleteboolean
isLoop
True, if the element is part of a closed loop of ways.boolean
isOnewayHead
boolean
isOnewayLoopBackwardPart
boolean
isOnewayLoopForwardPart
boolean
isOnewayTail
boolean
linkNext
True, if linked to the next member.boolean
linkPrev
True, if linked to the previous member.boolean
onewayFollowsNext
True, if the way is oneway and it doesn't follow the flow of the next memberboolean
onewayFollowsPrevious
False, if the way is oneway and it doesn't follow the flow of the previous member
-
Constructor Summary
Constructors Constructor Description WayConnectionType()
construct invalid instanceWayConnectionType(boolean invalid)
Constructs a valid or invalid instance.WayConnectionType(boolean linkPrev, boolean linkNext, WayConnectionType.Direction direction)
Constructs a valid instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getTooltip()
Returns the tooltip to display when hovering over the relation member.boolean
isValid()
Determines if the connection type is valid (i.e.String
toString()
-
-
-
Field Detail
-
invalid
private final boolean invalid
True, if the corresponding primitive is not a way or the way is incomplete
-
linkPrev
public boolean linkPrev
True, if linked to the previous member.
-
linkNext
public boolean linkNext
True, if linked to the next member.
-
direction
public WayConnectionType.Direction direction
direction is FORWARD if the first node of this way is connected to the previous way and / or the last node of this way is connected to the next way. direction is BACKWARD if it is the other way around. direction has a ONEWAY value, if it is tagged as such and it is connected to the previous / next member. ONEWAY_FORWARD == the first node of the oneway is the last node of the previous way ONEWAY_BACKWARD == the last node of the oneway is the last node of the previous way direction has a ROUNDABOUT value, if it is tagged as such and it is somehow connected to the previous / next member. If there is no connection to the previous or next member, then direction has the value NONE.
-
isLoop
public boolean isLoop
True, if the element is part of a closed loop of ways.
-
ignoreOneway
public boolean ignoreOneway
True, if all oneway features are ignored
-
isOnewayLoopForwardPart
public boolean isOnewayLoopForwardPart
-
isOnewayLoopBackwardPart
public boolean isOnewayLoopBackwardPart
-
isOnewayHead
public boolean isOnewayHead
-
isOnewayTail
public boolean isOnewayTail
-
onewayFollowsPrevious
public boolean onewayFollowsPrevious
False, if the way is oneway and it doesn't follow the flow of the previous member
-
onewayFollowsNext
public boolean onewayFollowsNext
True, if the way is oneway and it doesn't follow the flow of the next member
-
-
Constructor Detail
-
WayConnectionType
public WayConnectionType(boolean linkPrev, boolean linkNext, WayConnectionType.Direction direction)
Constructs a valid instance.- Parameters:
linkPrev
-true
if linked to the previous memberlinkNext
-true
if linked to the next memberdirection
- the direction type
-
WayConnectionType
public WayConnectionType(boolean invalid)
Constructs a valid or invalid instance.- Parameters:
invalid
-true
if the instance is invalid (i.e does not concern a complete way)
-
WayConnectionType
public WayConnectionType()
construct invalid instance
-
-
Method Detail
-
isValid
public boolean isValid()
Determines if the connection type is valid (i.e. it concerns a complete way).- Returns:
true
if the connection type is valid (i.e. it concerns a complete way)
-
getTooltip
public String getTooltip()
Returns the tooltip to display when hovering over the relation member.- Returns:
- The tooltip, never null.
- Since:
- 10248
-
-