Oracle Application Server Wireless Java API Reference
B14043-01


oracle.panama.spatial.yp
Class YPBusinessSort

java.lang.Object
  extended byoracle.panama.spatial.yp.YPBusinessSort


public class YPBusinessSort
extends java.lang.Object

This class aids with sorting YP businesses by distance.


Constructor Summary
YPBusinessSort()

Method Summary
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

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)

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

Oracle Application Server Wireless Java API Reference
B14043-01


Copyright © 2004 Oracle Corporation. All Rights Reserved.