Package org.opentripplanner.profile.DCFareCalculator

Examples of org.opentripplanner.profile.DCFareCalculator.Fare


                String from = reader.get("from_stop_id");
                String to = reader.get("to_stop_id");
                double low = Double.parseDouble(reader.get("low_fare"));
                double peak = Double.parseDouble(reader.get("peak_fare"));
                double senior = Double.parseDouble(reader.get("senior_fare"));
                Fare fare = new Fare(low, peak, senior);
                fares.put(new P2<String>(from, to), fare);
            }
        } catch (IOException ex) {
            LOG.error("Exception while loading fare table CSV.");
        }
View Full Code Here


            LOG.error("Exception while loading fare table CSV.");
        }
    }

    public Fare lookup (String from, String to) {
        return new Fare(fares.get(new P2<String>(from, to))); // defensive copy, in case the caller discounts
    }
View Full Code Here

TOP

Related Classes of org.opentripplanner.profile.DCFareCalculator.Fare

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.