public final class WaySegment extends java.lang.Object implements java.lang.Comparable<WaySegment>
| Modifier and Type | Field and Description |
|---|---|
int |
lowerIndex
The index of one of the 2 nodes in the way.
|
Way |
way
The way.
|
| Constructor and Description |
|---|
WaySegment(Way w,
int i)
Constructs a new
WaySegment. |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(WaySegment o) |
boolean |
equals(java.lang.Object o) |
Node |
getFirstNode()
Returns the first node of the way segment.
|
Node |
getSecondNode()
Returns the second (last) node of the way segment.
|
int |
hashCode() |
boolean |
intersects(WaySegment s2)
Checks whether this segment crosses other segment
|
java.lang.String |
toString() |
Way |
toWay()
Returns this way segment as complete way.
|
public int lowerIndex
lowerIndex + 1.public WaySegment(Way w, int i)
WaySegment.w - The wayi - The node lower indexpublic Node getFirstNode()
public Node getSecondNode()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic int compareTo(WaySegment o)
compareTo in interface java.lang.Comparable<WaySegment>public boolean intersects(WaySegment s2)
s2 - The other segmentpublic java.lang.String toString()
toString in class java.lang.Object