public static class FloodFiller.ScanSegment extends Object implements Comparable<FloodFiller.ScanSegment>
| Constructor and Description |
|---|
ScanSegment(int startX,
int endX,
int y)
Creates a new segment.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(FloodFiller.ScanSegment other)
Compares this segment to another.
|
boolean |
contains(int x,
int y)
Checks if the given location lies within this segment.
|
boolean |
equals(Object obj) |
int |
hashCode() |
public ScanSegment(int startX,
int endX,
int y)
startX - start X ordinateendX - end X ordinatey - Y ordinatepublic boolean contains(int x,
int y)
x - location X ordinatey - location Y ordinatepublic int compareTo(FloodFiller.ScanSegment other)
compareTo in interface Comparable<FloodFiller.ScanSegment>other - the other segmentCopyright © 2009–2020. All rights reserved.