| Revision 88,
526 bytes
checked in by jtorres, 9 years ago
(diff) |
|
Created a Highway.java class with list of sorted stations (by postmile). Highways.java: now has a loadHighways method which returns the List of highways with sorted stations. Highways.java handles loading and sorting, Highway.java just holds the data.
|
| Rev | Line | |
|---|
| 1 | package atmsdriver.model; |
|---|
| 2 | |
|---|
| 3 | import atmsdriver.model.Station.DIRECTION; |
|---|
| 4 | import java.util.ArrayList; |
|---|
| 5 | import java.util.Collections; |
|---|
| 6 | |
|---|
| 7 | /** |
|---|
| 8 | * |
|---|
| 9 | * @author jtorres |
|---|
| 10 | */ |
|---|
| 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) |
|---|
| 18 | { |
|---|
| 19 | this.highwayNumber = highwayNum; |
|---|
| 20 | this.direction = direction; |
|---|
| 21 | this.stations = stations; |
|---|
| 22 | } |
|---|
| 23 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.