public class SweepLineEvent extends Object implements Comparable
Constructor and Description |
---|
SweepLineEvent(double x,
SweepLineEvent insertEvent)
Creates a DELETE event.
|
SweepLineEvent(Object label,
double x,
Object obj)
Creates an INSERT event.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Object o)
Events are ordered first by their x-value, and then by their eventType.
|
int |
getDeleteEventIndex() |
SweepLineEvent |
getInsertEvent() |
Object |
getObject() |
boolean |
isDelete() |
boolean |
isInsert() |
boolean |
isSameLabel(SweepLineEvent ev) |
void |
setDeleteEventIndex(int deleteEventIndex) |
public SweepLineEvent(Object label, double x, Object obj)
label
- the edge set label for this objectx
- the event locationobj
- the object being insertedpublic SweepLineEvent(double x, SweepLineEvent insertEvent)
x
- the event locationinsertEvent
- the corresponding INSERT eventpublic boolean isInsert()
public boolean isDelete()
public SweepLineEvent getInsertEvent()
public int getDeleteEventIndex()
public void setDeleteEventIndex(int deleteEventIndex)
public Object getObject()
public boolean isSameLabel(SweepLineEvent ev)
public int compareTo(Object o)
compareTo
in interface Comparable
Copyright © 2022. All rights reserved.