oracle.panama.spatial.yp
Class YPBusinessSort

java.lang.Object
  |
  +--oracle.panama.spatial.yp.YPBusinessSort

public class YPBusinessSort
extends java.lang.Object


Constructor Summary
YPBusinessSort()
           
 
Method Summary
TypeMethod
static void main(java.lang.String[] args)
           
static Ranking sortByBusinessName(Location[] locations)
          This function sorts an array of YPBusiness objects alphabetically by business name.
static Ranking sortByDistance(Point[] locations, Point center)
          This function sorts an array of YPBusiness objects by their distance to a given point.
static Ranking sortByDrivingDistance(Point[] locations, Point center)
           
static Ranking sortByRegionName(Location[] locations)
          This function sorts an array of YPBusiness objects alphabetically by country, state, city and postal code (in that order).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

YPBusinessSort

public YPBusinessSort()
Method Detail

sortByBusinessName

public static Ranking sortByBusinessName(Location[] locations)
This function sorts an array of YPBusiness objects alphabetically by business name.
Parameters:
locations - an array of YPBusiness that will be sorted

sortByRegionName

public static Ranking sortByRegionName(Location[] locations)
This function sorts an array of YPBusiness objects alphabetically by country, state, city and postal code (in that order).
Parameters:
locations - an array of YPBusiness that will be sorted

sortByDistance

public static Ranking sortByDistance(Point[] locations,
                                     Point center)
This function sorts an array of YPBusiness objects by their distance to a given point.
Parameters:
locations - an array of YPBusiness that will be sorted
center - a Point representing the position, the distance to which determines the sorting order

sortByDrivingDistance

public static Ranking sortByDrivingDistance(Point[] locations,
                                            Point center)

main

public static void main(java.lang.String[] args)