- Timestamp:
- 10/11/2017 12:35:22 PM (9 years ago)
- File:
-
- 1 edited
-
trunk/src/atmsdriver/model/Highway.java (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/atmsdriver/model/Highway.java
r89 r93 1 1 package atmsdriver.model; 2 2 3 import atmsdriver.model.Station.DIRECTION;4 3 import java.util.ArrayList; 5 import java.util.Collections;6 4 7 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. 8 9 * 9 * @author j torres10 * @author jdalbey 10 11 */ 11 class Highway { 12 13 final private ArrayList<Station> stations; 14 final private Integer highwayNumber; 15 final private DIRECTION direction; 16 17 public Highway(Integer highwayNum, DIRECTION direction, ArrayList<Station> stations) 12 final 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) 18 25 { 19 26 this.highwayNumber = highwayNum; 20 this.direction = direction;21 27 this.stations = stations; 22 28 } 23 24 public Integer getRouteNumber()25 {26 return this.highwayNumber;27 }28 29 public DIRECTION getDirection()30 {31 return this.direction;32 }33 34 public ArrayList<Station> getStations()35 {36 return this.stations;37 }38 29 }
Note: See TracChangeset
for help on using the changeset viewer.
