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         * If zf is empty or null then there is no zipcode filtering for
022         * the database.
023         * @return A DirectionsFinder whose set of segments is 
024         *  { s | s in (new StreetSegReader(databaseName)).streetSegs () &&
025         *  (s.leftZip in zf || s.rightZip in zf || (s.leftZip.trim () == 
026         *  s.rightZip.trim () == "") || zf == null) }
027         * @throws InvalidDatabaseException if databaseName does not refer to a 
028         *  valid tiger database.
029         */
030        public static DirectionsFinder getDirectionsFinder(String databaseName, Collection<String> zf) 
031            throws InvalidDatabaseException { 
032            throw new RuntimeException("Not implemented"); 
033        }
034        
035        /** Gets directions from start to end.
036         *
037         * @throws InvalidAddressException if start or end is not in the
038         *  geographical area covered by this DirectionsFinder.
039         * @throws NoPathException if no path could be found from start to end.
040         * @return A Directions providing directions of travel from start to end.
041         */
042        public Directions getDirections(Address start, Address end, ps2.RouteFormatter routeFormat) 
043            throws InvalidAddressException, NoPathException { 
044            throw new RuntimeException("Not implemented"); 
045        }
046    }