
org.opentripplanner.model.plan.TripPlan Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of otp Show documentation
Show all versions of otp Show documentation
The OpenTripPlanner multimodal journey planning system
The newest version!
package org.opentripplanner.model.plan;
import java.time.Instant;
import java.util.Collection;
import java.util.List;
import org.opentripplanner.framework.tostring.ToStringBuilder;
/**
* A TripPlan is a set of ways to get from point A to point B at time T.
*/
public class TripPlan {
/** The time and date of travel */
public final Instant date;
/** The origin */
public final Place from;
/** The destination */
public final Place to;
public final List itineraries;
public TripPlan(Place from, Place to, Instant date, Collection itineraries) {
this.from = from;
this.to = to;
this.date = date;
this.itineraries = List.copyOf(itineraries);
}
@Override
public String toString() {
return ToStringBuilder
.of(TripPlan.class)
.addObj("date", date)
.addObj("from", from)
.addObj("to", to)
.addObj("itineraries", itineraries)
.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy