source: tmcsimulator/trunk/src/atmsdriver/model/Highway.java @ 93

Revision 93, 865 bytes checked in by jdalbey, 9 years ago (diff)

Highway.java: Removed direction and made immutable

Line 
1package atmsdriver.model;
2
3import java.util.ArrayList;
4
5/**
6 * Highway represents a freeway that has two directions of traffic. A highway is
7 * identified by its highway number.  A highway contains lane detector stations,
8 * called Stations, along its length.
9 *
10 * @author jdalbey
11 */
12final class Highway
13{
14    /** The identifying number for this highway, e.g., 101 */
15    public final Integer highwayNumber;
16    /** The ordered list of stations (lane detector stations) on this highway */
17    public final ArrayList<Station> stations;
18
19    /** Construct a highway
20     *
21     * @param highwayNum integer identifier for this highway
22     * @param stations ordered list of stations on this highway
23     */
24    public Highway(Integer highwayNum, ArrayList<Station> stations)
25    {
26        this.highwayNumber = highwayNum;
27        this.stations = stations;
28    }
29}
Note: See TracBrowser for help on using the repository browser.