001    package ps6;
002    
003    import java.util.Collection;
004    
005    /**
006     *   A DirectionsFinder produces directions for traveling from one
007     *   address to another in a particular geographical area.
008     *   @specfield segments : set[StreetSegment] // the set of StreetSegments
009     *   which represents the geographical area for which this DirectionsFinder
010     *   produces directions
011     */
012    public class DirectionsFinder
013    {
014    
015        // just to trick javadocs to not include a default public constructor
016        private DirectionsFinder () { }
017    
018        /** Produces a DirectionsFinder for a given database.
019         * @param databaseName the database to find directions in
020         * @param zf a collection of zipcodes used for zipcode filtering.
021         * Only matching zipcodes will be used.
022         * If zf is empty or null then there is no zipcode filtering for
023         * the database.
024         * @return A DirectionsFinder whose set of segments is
025         *  { s | s in (new StreetSegReader(databaseName)).streetSegs () &&
026         *  (s.leftZip in zf || s.rightZip in zf || (s.leftZip.trim () ==
027         *  s.rightZip.trim () == "") || zf == null) }
028         * @throws InvalidDatabaseException if databaseName does not refer to a
029         *  valid tiger database.
030         */
031        public static DirectionsFinder getDirectionsFinder(String databaseName, Collection<String> zf)
032            throws InvalidDatabaseException {
033            throw new RuntimeException("Not implemented");
034        }
035    
036        /** Gets directions from start to end.
037         *
038         * @throws InvalidAddressException if start or end is not in the
039         *  geographical area covered by this DirectionsFinder.
040         * @throws NoPathException if no path could be found from start to end.
041         * @return A Directions providing directions of travel from start to end.
042         */
043        public Directions getDirections(Address start, Address end, ps2.RouteFormatter routeFormat)
044            throws InvalidAddressException, NoPathException {
045            throw new RuntimeException("Not implemented");
046        }
047    }