Class SweepLineEvent
java.lang.Object
org.locationtech.jts.geomgraph.index.SweepLineEvent
- All Implemented Interfaces:
Comparable
- Version:
- 1.7
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
private int
private int
private static final int
private SweepLineEvent
private Object
private Object
private double
-
Constructor Summary
ConstructorsConstructorDescriptionSweepLineEvent
(double x, SweepLineEvent insertEvent) Creates a DELETE event.SweepLineEvent
(Object label, double x, Object obj) Creates an INSERT event. -
Method Summary
Modifier and TypeMethodDescriptionint
Events are ordered first by their x-value, and then by their eventType.int
boolean
isDelete()
boolean
isInsert()
boolean
void
setDeleteEventIndex
(int deleteEventIndex)
-
Field Details
-
INSERT
private static final int INSERT- See Also:
-
DELETE
private static final int DELETE- See Also:
-
label
-
xValue
private double xValue -
eventType
private int eventType -
insertEvent
-
deleteEventIndex
private int deleteEventIndex -
obj
-
-
Constructor Details
-
SweepLineEvent
Creates an INSERT event.- Parameters:
label
- the edge set label for this objectx
- the event locationobj
- the object being inserted
-
SweepLineEvent
Creates a DELETE event.- Parameters:
x
- the event locationinsertEvent
- the corresponding INSERT event
-
-
Method Details
-
isInsert
public boolean isInsert() -
isDelete
public boolean isDelete() -
getInsertEvent
-
getDeleteEventIndex
public int getDeleteEventIndex() -
setDeleteEventIndex
public void setDeleteEventIndex(int deleteEventIndex) -
getObject
-
isSameLabel
-
compareTo
Events are ordered first by their x-value, and then by their eventType. Insert events are sorted before Delete events, so that items whose Insert and Delete events occur at the same x-value will be correctly handled.- Specified by:
compareTo
in interfaceComparable
-