Package jmri.jmrit.timetable
Class Station
java.lang.Object
jmri.jmrit.timetable.Station
Define the content of a Station record.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCopy(int segmentId) Make a copy of the station.doublebooleanintintintintvoidsetDistance(double newDistance) Set a new distance.voidsetDoubleTrack(boolean newDoubleTrack) voidsetSidings(int newSidings) Set a new siding count.voidsetStaging(int newStaging) Set a new staging track count.voidsetStationName(String newName) toString()
-
Field Details
-
_dm
-
-
Constructor Details
-
Station
Create a new station with default values.- Parameters:
segmentId- The parent segment id.- Throws:
IllegalArgumentException- STATION_ADD_FAIL
-
Station
-
-
Method Details
-
getCopy
Make a copy of the station.- Parameters:
segmentId- The new segmentId, if zero use the current segment id.- Returns:
- a new station instance.
-
getStationId
-
getSegmentId
-
getStationName
-
setStationName
-
getDistance
-
setDistance
Set a new distance.- Parameters:
newDistance- The value to be used.- Throws:
IllegalArgumentException- (DISTANCE_LT_0) if the value is less than 0.0.
-
getDoubleTrack
-
setDoubleTrack
-
getSidings
-
setSidings
Set a new siding count.- Parameters:
newSidings- The value to be used.- Throws:
IllegalArgumentException- (SIDINGS_LT_0) if the value is less than 0.
-
getStaging
-
setStaging
Set a new staging track count.- Parameters:
newStaging- The value to be used.- Throws:
IllegalArgumentException- (STAGING_LT_0, STAGING_IN_USE) if the value is less than 0 or a staging track is referenced by a train stop.
-
toString
-