public final class MultiLinePoint
extends java.lang.Object
MultiLineIntersection algorithms.
Immutable class representing one valid intersection point found by the
MultiLineIntersection algorithms. The complete results are
stored as collections of zero or more MultiLinePoint instances.
MultiLinePoint holds the input MultiLinePoint.Line.index of all intersecting
line segments, as well as the MultiLinePoint.Line.location of the shared
coordinates relative to each line segment.
| Modifier and Type | Class and Description |
|---|---|
static class |
MultiLinePoint.Line
Represents one of the line segments intersecting at the
shared coordinates. |
| Modifier and Type | Field and Description |
|---|---|
MultiLinePoint.Line[] |
lines
The line segments intersecting at the
shared coordinates. |
PointD |
shared
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Compares the specified
Object to this MultiLinePoint instance. |
int |
hashCode()
Returns a hash code for the
MultiLinePoint. |
java.lang.String |
toString()
Returns a
String representation of the MultiLinePoint. |
public final MultiLinePoint.Line[] lines
shared coordinates.
Holds the indices of the line segments in the original input collection that
intersect at the shared coordinates, as well as these coordinates’
LineLocation relative to the corresponding input line segment.
Always contains at least two elements. The element order is arbitrary,
depending on the generation sequence by MultiLineIntersection.
public final PointD shared
PointD coordinates shared by all intersected lines.
Holds the coordinates where all lines intersect. These coordinates
are always computed (rather than copied) if all MultiLinePoint.Line.location values
equal LineLocation.BETWEEN.
Otherwise, the coordinates are either computed, or copied from the LineD.start
or LineD.end point of a lines element whose MultiLinePoint.Line.location
equals LineLocation.START or LineLocation.END, respectively.
public boolean equals(java.lang.Object obj)
Object to this MultiLinePoint instance.equals in class java.lang.Objectobj - the Object to compare to this instancetrue if obj is not null and a MultiLinePoint
instance whose shared coordinates and lines array equal those
of this instance, else falsepublic int hashCode()
MultiLinePoint.hashCode in class java.lang.ObjectInteger hash code for the MultiLinePointpublic java.lang.String toString()
String representation of the MultiLinePoint.