Class SweepLineEvent

java.lang.Object
org.locationtech.jts.geomgraph.index.SweepLineEvent
All Implemented Interfaces:
Comparable

public class SweepLineEvent extends Object implements Comparable
Version:
1.7
  • Field Details

    • INSERT

      private static final int INSERT
      See Also:
    • DELETE

      private static final int DELETE
      See Also:
    • label

      private Object label
    • xValue

      private double xValue
    • eventType

      private int eventType
    • insertEvent

      private SweepLineEvent insertEvent
    • deleteEventIndex

      private int deleteEventIndex
    • obj

      private Object obj
  • Constructor Details

    • SweepLineEvent

      public SweepLineEvent(Object label, double x, Object obj)
      Creates an INSERT event.
      Parameters:
      label - the edge set label for this object
      x - the event location
      obj - the object being inserted
    • SweepLineEvent

      public SweepLineEvent(double x, SweepLineEvent insertEvent)
      Creates a DELETE event.
      Parameters:
      x - the event location
      insertEvent - the corresponding INSERT event
  • Method Details

    • isInsert

      public boolean isInsert()
    • isDelete

      public boolean isDelete()
    • getInsertEvent

      public SweepLineEvent getInsertEvent()
    • getDeleteEventIndex

      public int getDeleteEventIndex()
    • setDeleteEventIndex

      public void setDeleteEventIndex(int deleteEventIndex)
    • getObject

      public Object getObject()
    • isSameLabel

      public boolean isSameLabel(SweepLineEvent ev)
    • compareTo

      public int compareTo(Object o)
      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 interface Comparable