1 package com.pathfinder.api; 2 3 import java.io.Serializable; 4 import java.util.Collections; 5 import java.util.List; 6 7 /** 8 * 9 */ 10 public final class TransitPath implements Serializable { 11 12 private final List<TransitEdge> transitEdges; 13 14 /** 15 * Constructor. 16 * 17 * @param transitEdges The legs for this itinerary. 18 */ 19 public TransitPath(final List<TransitEdge> transitEdges) { 20 this.transitEdges = transitEdges; 21 } 22 23 /** 24 * @return An unmodifiable list DTOs. 25 */ 26 public List<TransitEdge> getTransitEdges() { 27 return Collections.unmodifiableList(transitEdges); 28 } 29 }