protected class CoordinateManager.DistanceComparator extends java.lang.Object implements java.util.Comparator<RepositoryItem>
Constructor and Description |
---|
CoordinateManager.DistanceComparator(Coordinate pCoordinate)
Default constructor for a distance comparison
|
Modifier and Type | Method and Description |
---|---|
int |
compare(RepositoryItem pO1,
RepositoryItem pO2) |
Coordinate |
getCoordinate()
Get the central coordinate
|
void |
setCoordinate(Coordinate pCoordinate)
Set the central coordinate
|
public CoordinateManager.DistanceComparator(Coordinate pCoordinate)
pCoordinate
- The central location to compare distances frompublic Coordinate getCoordinate()
public void setCoordinate(Coordinate pCoordinate)
pCoordinate
- the coordinatepublic int compare(RepositoryItem pO1, RepositoryItem pO2)
compare
in interface java.util.Comparator<RepositoryItem>