public class PointAndRange extends Object implements Serializable, Comparable<PointAndRange>
Modifier and Type | Field and Description |
---|---|
Point2d |
point |
double |
range |
static Comparator<PointAndRange> |
thePointComparator |
static Comparator<PointAndRange> |
theRangeComparator |
Constructor and Description |
---|
PointAndRange(double x,
double y,
double r)
Create a new
Point2d with x and y
coordinates set to the given values. |
PointAndRange(Point2d point,
double range)
Create a new PointAndRange from a Point2d and a range.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(PointAndRange other)
Compare two PointAndRanges.
|
boolean |
equals(Object pr) |
static Comparator<PointAndRange> |
pointComparator() |
static Comparator<PointAndRange> |
rangeComparator() |
public final Point2d point
public final double range
public static final Comparator<PointAndRange> theRangeComparator
public static final Comparator<PointAndRange> thePointComparator
public PointAndRange(Point2d point, double range)
public PointAndRange(double x, double y, double r)
Point2d
with x and y
coordinates set to the given values.x
- The value of the x coordinate.y
- The value of the y coordinate.public static Comparator<PointAndRange> rangeComparator()
public static Comparator<PointAndRange> pointComparator()
public int compareTo(PointAndRange other)
compareTo
in interface Comparable<PointAndRange>
Copyright © 2012 Thomas Hillebrandt. All Rights Reserved.