View Javadoc

1   package com.pathfinder.api;
2   
3   import java.io.Serializable;
4   import java.util.Date;
5   
6   /**
7    * Represents an edge in a path through a graph,
8    * describing the route of a cargo.
9    *  
10   */
11  public final class TransitEdge implements Serializable {
12  
13    private final String voyageNumber;
14    private final String fromUnLocode;
15    private final String toUnLocode;
16    private final Date fromDate;
17    private final Date toDate;
18  
19    /**
20     * Constructor.
21     *
22     * @param voyageNumber
23     * @param fromUnLocode
24     * @param toUnLocode
25     * @param fromDate
26     * @param toDate
27     */
28    public TransitEdge(final String voyageNumber,
29                       final String fromUnLocode,
30                       final String toUnLocode,
31                       final Date fromDate,
32                       final Date toDate) {
33      this.voyageNumber = voyageNumber;
34      this.fromUnLocode = fromUnLocode;
35      this.toUnLocode = toUnLocode;
36      this.fromDate = fromDate;
37      this.toDate = toDate;
38    }
39  
40    public String getVoyageNumber() {
41      return voyageNumber;
42    }
43  
44    public String getFromUnLocode() {
45      return fromUnLocode;
46    }
47  
48    public String getToUnLocode() {
49      return toUnLocode;
50    }
51  
52    public Date getFromDate() {
53      return fromDate;
54    }
55  
56    public Date getToDate() {
57      return toDate;
58    }
59  }