public static class Rect.Edge extends java.lang.Object implements java.lang.Comparable<Rect.Edge>
Rect class to track the edges of a rectangle.| Modifier and Type | Field and Description |
|---|---|
boolean |
isStart
Indicates whether the edge is a starting edge or not.
|
int |
x
The value of x is used to represent the x-coordinate of an edge of a rectangle.
|
int |
y1
The value of y1 is used to represent the starting y-coordinate of an edge of a rectangle.
|
int |
y2
The value of y2 is used to represent the ending y-coordinate of an edge of a rectangle.
|
| Constructor and Description |
|---|
Edge(int x,
int y1,
int y2,
boolean isStart)
The Edge class represents an edge of a rectangle defined by its starting and ending coordinates.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Rect.Edge other)
Compares this Edge with the specified Edge for order.
|
public int x
public int y1
public int y2
public boolean isStart
Edge(int x,
int y1,
int y2,
boolean isStart)
Rect class to track the edges of a rectangle.public int compareTo(Rect.Edge other)
compareTo in interface java.lang.Comparable<Rect.Edge>other - the Edge to be compared