Package jmri.jmrit.operations.locations
Class Track
- java.lang.Object
-
- jmri.beans.PropertyChangeSupport
-
- jmri.jmrit.operations.locations.Track
-
- All Implemented Interfaces:
PropertyChangeFirer,PropertyChangeProvider
public class Track extends PropertyChangeSupport
Represents a location (track) on the layout Can be a spur, yard, staging, or interchange track.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String_alternateTrackIdprotected int_blockingOrderprotected int_blockOptionsprotected java.lang.String_commentprotected java.lang.String_commentBothprotected java.lang.String_commentPickupprotected java.lang.String_commentSetoutprotected java.util.List<java.lang.String>_destinationIdListprotected java.lang.String_destinationOptionprotected java.util.List<java.lang.String>_dropListprotected java.lang.String_dropOptionprotected int_dropRSprotected boolean_holdCustomLoadsprotected java.lang.String_idprotected int_ignoreUsedLengthPercentageprotected int_lengthprotected java.util.List<java.lang.String>_loadListprotected java.lang.String_loadOptionprotected int_loadOptionsprotected Location_locationprotected int_maximumLengthprotected int_minimumLengthprotected int_modeprotected int_movesprotected java.lang.String_nameprotected int_numberCarsprotected int_numberCarsEnRouteprotected int_numberEnginesprotected int_numberRSprotected boolean_onlyCarsWithFDprotected java.lang.String_orderprotected java.util.List<java.lang.String>_pickupListprotected java.lang.String_pickupOptionprotected int_pickupRSprotected Pool_poolprotected boolean_printCommentManifestprotected boolean_printCommentSwitchListprotected Reporter_readerprotected int_reservationFactorprotected int_reservedprotected int_reservedEnRouteprotected int_reservedLengthPickupsprotected int_reservedLengthSetoutsprotected java.util.List<java.lang.String>_roadListprotected java.lang.String_roadOptionprotected int_scheduleCountprotected java.lang.String_scheduleIdprotected java.lang.String_scheduleItemIdprotected java.lang.String_scheduleNameprotected java.util.List<java.lang.String>_shipLoadListprotected java.lang.String_shipLoadOptionprotected java.lang.String_trackPriorityprotected java.lang.String_trackTypeprotected int_trainDirprotected java.util.List<java.lang.String>_typeListprotected int_usedLengthstatic java.lang.StringALLstatic java.lang.StringALL_DESTINATIONSstatic java.lang.StringALL_LOADSstatic java.lang.StringALL_ROADSstatic java.lang.StringALTERNATE_TRACK_CHANGED_PROPERTYstatic java.lang.StringANYstatic java.lang.StringCAPACITYstatic java.lang.StringCUSTOMstatic java.lang.StringDESTINATIONstatic java.lang.StringDESTINATION_OPTIONS_CHANGED_PROPERTYstatic java.lang.StringDESTINATIONS_CHANGED_PROPERTYstatic java.lang.StringDISPOSE_CHANGED_PROPERTYstatic java.lang.StringDROP_CHANGED_PROPERTYstatic intEASTstatic java.lang.StringEXCLUDE_DESTINATIONSstatic java.lang.StringEXCLUDE_LOADSstatic java.lang.StringEXCLUDE_ROADSstatic java.lang.StringEXCLUDE_ROUTESstatic java.lang.StringEXCLUDE_TRAINSstatic java.lang.StringFIFOstatic java.lang.StringHOLD_CARS_CHANGED_PROPERTYstatic intIGNORE_0static intIGNORE_100static intIGNORE_25static intIGNORE_50static intIGNORE_75static java.lang.StringINCLUDE_DESTINATIONSstatic java.lang.StringINCLUDE_LOADSstatic java.lang.StringINCLUDE_ROADSstatic java.lang.StringINTERCHANGEstatic java.lang.StringLENGTHstatic java.lang.StringLENGTH_CHANGED_PROPERTYstatic java.lang.StringLIFOstatic java.lang.StringLOADstatic java.lang.StringLOAD_OPTIONS_CHANGED_PROPERTYstatic java.lang.StringLOADS_CHANGED_PROPERTYstatic intMATCHstatic java.lang.StringMAX_LENGTH_CHANGED_PROPERTYstatic java.lang.StringMIN_LENGTH_CHANGED_PROPERTYstatic java.lang.StringNAME_CHANGED_PROPERTYstatic java.lang.StringNO_FINAL_DESTINATIONstatic java.lang.StringNONEstatic java.lang.StringNORMALstatic intNORTHstatic java.lang.StringOKAYstatic java.lang.StringPICKUP_CHANGED_PROPERTYstatic java.lang.StringPICKUP_OKAYstatic java.lang.StringPLANNED_PICKUPS_CHANGED_PROPERTYstatic java.lang.StringPOOL_CHANGED_PROPERTYstatic java.lang.StringPRIORITY_CHANGED_PROPERTYstatic java.lang.StringPRIORITY_HIGHstatic java.lang.StringPRIORITY_LOWstatic java.lang.StringPRIORITY_MEDIUMstatic java.lang.StringPRIORITY_NORMALstatic java.lang.StringROADstatic java.lang.StringROADS_CHANGED_PROPERTYstatic java.lang.StringROUTED_CHANGED_PROPERTYstatic java.lang.StringROUTESstatic java.lang.StringSCHEDULEstatic java.lang.StringSCHEDULE_CHANGED_PROPERTYstatic java.lang.StringSCHEDULE_ID_CHANGED_PROPERTYstatic java.lang.StringSCHEDULE_MODE_CHANGED_PROPERTYstatic intSEQUENTIALstatic java.lang.StringSERVICE_ORDER_CHANGED_PROPERTYstatic intSOUTHstatic java.lang.StringSPURstatic java.lang.StringSTAGINGstatic java.lang.StringTRACK_BLOCKING_ORDER_CHANGED_PROPERTYstatic java.lang.StringTRACK_COMMENT_CHANGED_PROPERTYstatic java.lang.StringTRACK_FACTOR_CHANGED_PROPERTYstatic java.lang.StringTRACK_REPORTER_CHANGED_PROPERTYstatic java.lang.StringTRACK_TYPE_CHANGED_PROPERTYstatic java.lang.StringTRAIN_DIRECTION_CHANGED_PROPERTYstatic java.lang.StringTRAIN_SCHEDULEstatic java.lang.StringTRAINSstatic java.lang.StringTYPEstatic java.lang.StringTYPES_CHANGED_PROPERTYstatic intWESTstatic java.lang.StringYARD-
Fields inherited from class jmri.beans.PropertyChangeSupport
propertyChangeSupport
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDestination(Location destination)adds a location to the list of acceptable destinations for this track.voidaddDropId(java.lang.String id)voidaddDropRS(RollingStock rs)voidaddLoadName(java.lang.String load)Add a receive load that the track will either service or exclude.voidaddPickupId(java.lang.String id)Add train or route id to this track.voidaddPickupRS(RollingStock rs)Increments the number of cars and or engines that will be picked up by a train from this track.voidaddReservedInRoute(Car car)voidaddRoadName(java.lang.String road)voidaddRS(RollingStock rs)Adds rolling stock to a specific track.voidaddShipLoadName(java.lang.String load)Add a ship load that the track will either service or exclude.voidaddTypeName(java.lang.String type)voidbumpMoves()voidbumpSchedule()Increments the schedule count if there's a schedule and the schedule is running in sequential mode.java.lang.StringcheckPickups()Checks to see if all car types can be pulled from this trackjava.lang.StringcheckSchedule(Car car)Checks to see if car can be placed on this spur using this schedule.booleancheckScheduleAttribute(java.lang.String attribute, java.lang.String carType, Car car)java.lang.StringcheckScheduleValid()Check to see if schedule is valid for the track at this location.booleancontainsDropId(java.lang.String id)booleancontainsPickupId(java.lang.String id)booleancontainsRoadName(java.lang.String road)TrackcopyTrack(java.lang.String newName, Location newLocation)Creates a copy of this track.voiddeleteDestination(Location destination)voiddeleteDropId(java.lang.String id)voiddeleteDropRS(RollingStock rs)voiddeleteLoadName(java.lang.String load)Delete a receive load name that the track will either service or exclude.voiddeletePickupId(java.lang.String id)voiddeletePickupRS(RollingStock rs)voiddeleteReservedInRoute(Car car)voiddeleteRoadName(java.lang.String road)voiddeleteRS(RollingStock rs)voiddeleteShipLoadName(java.lang.String load)Delete a ship load name that the track will either service or exclude.voiddeleteTypeName(java.lang.String type)voiddispose()TrackgetAlternateTrack()Returns the alternate track for a spurintgetAvailableTrackSpace()Available track space.intgetBlockingOrder()Gets the blocking order for this track.java.lang.StringgetComment()java.lang.StringgetCommentBoth()java.lang.StringgetCommentBothWithColor()java.lang.StringgetCommentPickup()java.lang.StringgetCommentPickupWithColor()java.lang.StringgetCommentSetout()java.lang.StringgetCommentSetoutWithColor()ScheduleItemgetCurrentScheduleItem()Get's the current schedule item for this track Protects against user deleting an item in a shared schedule.java.lang.String[]getDestinationIds()intgetDestinationListSize()java.lang.StringgetDestinationOption()Get destination option for interchange or staging trackDivisiongetDivision()java.lang.StringgetDivisionName()java.lang.String[]getDropIds()java.lang.StringgetDropOption()Gets the drop option for this track.intgetDropRS()java.lang.StringgetId()intgetIgnoreUsedLengthPercentage()intgetLength()java.lang.String[]getLoadNames()Provides a list of receive loads that the track will either service or exclude.java.lang.StringgetLoadOption()Gets the car receive load option for this track.java.lang.StringgetLoadOptionString()LocationgetLocation()intgetMoves()java.lang.StringgetName()ScheduleItemgetNextScheduleItem()intgetNumberCars()intgetNumberEngines()intgetNumberOfCarsInRoute()intgetNumberRS()java.lang.String[]getPickupIds()java.lang.StringgetPickupOption()Gets the pickup option for this track.intgetPickupRS()PoolgetPool()intgetPoolMaximumLength()intgetPoolMinimumLength()java.lang.StringgetPoolName()ReportergetReporter()java.lang.StringgetReporterName()intgetReservationFactor()intgetReserved()intgetReservedInRoute()Used to determine how much track space is going to be consumed by cars in route to this track.intgetReservedLengthPickups()intgetReservedLengthSetouts()java.lang.String[]getRoadNames()java.lang.StringgetRoadOption()java.lang.StringgetRoadOptionString()SchedulegetSchedule()intgetScheduleCount()Returns how many times the current schedule item has been accessed.java.lang.StringgetScheduleId()java.lang.StringgetScheduleItemId()Recommend getCurrentScheduleItem() to get the current schedule item for this track.intgetScheduleMode()Gets the mode of operation for the schedule assigned to this track.java.lang.StringgetScheduleModeName()java.lang.StringgetScheduleName()Returns the name of the schedule.java.lang.StringgetServiceOrder()Get the service order for this track.java.lang.String[]getShipLoadNames()Provides a list of ship loads that the track will either service or exclude.java.lang.StringgetShipLoadOption()Gets the car ship load option for this track.java.lang.StringgetShipLoadOptionString()java.lang.StringgetSplitName()java.lang.StringgetTrackPriority()A track has four priorities: PRIORITY_HIGH, PRIORITY_MEDIUM, PRIORITY_NORMAL, and PRIORITY_LOW.java.lang.StringgetTrackType()Gets the track typejava.lang.StringgetTrackTypeName()static java.lang.StringgetTrackTypeName(java.lang.String trackType)intgetTrainDirections()java.lang.String[]getTypeNames()Returns all of the rolling stock type names serviced by this track.intgetUsedLength()booleanhasMessages()booleanisAddCustomLoadsAnySpurEnabled()booleanisAddCustomLoadsAnyStagingTrackEnabled()booleanisAddCustomLoadsEnabled()booleanisAlternate()Used to determine if track has been assigned as an alternatebooleanisBlockCarsEnabled()When enabled block cars from staging.booleanisDestinationAccepted(Location destination)Returns true if destination is valid from this track.booleanisDisableLoadChangeEnabled()booleanisDropRouteAccepted(Route route)booleanisDropTrainAccepted(Train train)Determine if train can set out cars to this track.booleanisHoldCarsWithCustomLoadsEnabled()If enabled (true), hold cars with custom loads rather than allowing them to go to staging if the spur and the alternate track were full.booleanisInterchange()booleanisLoadEmptyEnabled()booleanisLoadNameAccepted(java.lang.String load)Determine if track will service a specific receive load name.booleanisLoadNameAndCarTypeAccepted(java.lang.String load, java.lang.String type)Determine if track will service a specific receive load and car type.booleanisLoadNameAndCarTypeShipped(java.lang.String load, java.lang.String type)Determine if track will service a specific ship load and car type.booleanisLoadNameShipped(java.lang.String load)Determine if track will service a specific ship load name.booleanisLoadSwapEnabled()booleanisModifyLoadsEnabled()booleanisOnlyCarsWithFinalDestinationEnabled()When true the track will only accept cars that have a final destination that can be serviced by the track.booleanisPickupRouteAccepted(Route route)booleanisPickupTrainAccepted(Train train)Determine if train can pick up cars from this track.booleanisPrintManifestCommentEnabled()booleanisPrintSwitchListCommentEnabled()booleanisQuickServiceEnabled()booleanisRemoveCustomLoadsEnabled()booleanisRoadNameAccepted(java.lang.String road)java.lang.StringisRollingStockAccepted(RollingStock rs)Used to determine if track can service the rolling stock.booleanisSpaceAvailable(Car car)Used to determine if there's space available at this track for the car.booleanisSpur()booleanisStaging()booleanisTypeNameAccepted(java.lang.String type)booleanisYard()java.lang.StringscheduleNext(Car car)Check to see if track has schedule and if it does will schedule the next item in the list.voidsetAddCustomLoadsAnySpurEnabled(boolean enable)When enabled, add custom car loads if there's a demand by any spur/industry.voidsetAddCustomLoadsAnyStagingTrackEnabled(boolean enable)When enabled, add custom car loads to cars in staging for new destinations that are staging.voidsetAddCustomLoadsEnabled(boolean enable)When enabled, add custom car loads if there's a demand.voidsetAlternateTrack(Track track)voidsetBlockCarsEnabled(boolean enable)voidsetBlockingOrder(int order)voidsetComment(java.lang.String comment)voidsetCommentBoth(java.lang.String comment)voidsetCommentPickup(java.lang.String comment)voidsetCommentSetout(java.lang.String comment)voidsetDestinationIds(java.lang.String[] ids)voidsetDestinationOption(java.lang.String option)Sets the destination option for this track.protected voidsetDirtyAndFirePropertyChange(java.lang.String p, java.lang.Object old, java.lang.Object n)voidsetDisableLoadChangeEnabled(boolean enable)voidsetDropOption(java.lang.String option)Set the car drop option for this track.voidsetHoldCarsWithCustomLoadsEnabled(boolean enable)voidsetIgnoreUsedLengthPercentage(int percentage)The amount of consumed track space to be ignored when sending new rolling stock to the track.voidsetLength(int length)voidsetLoadEmptyEnabled(boolean enable)Enable setting the car generic load state to empty when car arrives at this track.voidsetLoadOption(java.lang.String option)Set how this track deals with receiving car loadsvoidsetLoadSwapEnabled(boolean enable)Enable changing the car generic load state when car arrives at this track.voidsetMoves(int moves)voidsetName(java.lang.String name)voidsetOnlyCarsWithFinalDestinationEnabled(boolean enable)voidsetPickupOption(java.lang.String option)Set the car pick up option for this track.voidsetPool(Pool pool)voidsetPoolMaximumLength(int length)Sets the maximum length of this track when the track is in a pool.voidsetPoolMinimumLength(int length)Sets the minimum length of this track when the track is in a pool.voidsetPrintManifestCommentEnabled(boolean enable)voidsetPrintSwitchListCommentEnabled(boolean enable)voidsetQuickServiceEnabled(boolean enable)voidsetRemoveCustomLoadsEnabled(boolean enable)When enabled, remove Scheduled car loads.voidsetReporter(Reporter r)voidsetReservationFactor(int factor)Set the reservation factor.protected voidsetReserved(int reserved)The amount of track space that is reserved for car drops or pick ups.voidsetRoadOption(java.lang.String option)Set the road option for this track.voidsetSchedule(Schedule schedule)voidsetScheduleCount(int count)voidsetScheduleId(java.lang.String id)voidsetScheduleItemId(java.lang.String id)voidsetScheduleMode(int mode)Sets the mode of operation for the schedule assigned to this track.voidsetServiceOrder(java.lang.String order)Set the service order for this track.voidsetShipLoadOption(java.lang.String option)Set how this track deals with shipping car loadsvoidsetTrackPriority(java.lang.String priority)voidsetTrackType(java.lang.String type)Sets the track type, spur, interchange, yard, stagingvoidsetTrainDirections(int direction)Sets the train directions that can service this trackvoidsetUsedLength(int length)org.jdom2.Elementstore()Create an XML element to represent this Entry.java.lang.StringtoString()-
Methods inherited from class jmri.beans.PropertyChangeSupport
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
-
-
-
Field Detail
-
NONE
public static final java.lang.String NONE
- See Also:
- Constant Field Values
-
_id
protected java.lang.String _id
-
_name
protected java.lang.String _name
-
_trackType
protected java.lang.String _trackType
-
_trainDir
protected int _trainDir
-
_numberRS
protected int _numberRS
-
_numberCars
protected int _numberCars
-
_numberEngines
protected int _numberEngines
-
_pickupRS
protected int _pickupRS
-
_dropRS
protected int _dropRS
-
_length
protected int _length
-
_reserved
protected int _reserved
-
_reservedLengthSetouts
protected int _reservedLengthSetouts
-
_reservedLengthPickups
protected int _reservedLengthPickups
-
_numberCarsEnRoute
protected int _numberCarsEnRoute
-
_usedLength
protected int _usedLength
-
_ignoreUsedLengthPercentage
protected int _ignoreUsedLengthPercentage
-
IGNORE_0
public static final int IGNORE_0
- See Also:
- Constant Field Values
-
IGNORE_25
public static final int IGNORE_25
- See Also:
- Constant Field Values
-
IGNORE_50
public static final int IGNORE_50
- See Also:
- Constant Field Values
-
IGNORE_75
public static final int IGNORE_75
- See Also:
- Constant Field Values
-
IGNORE_100
public static final int IGNORE_100
- See Also:
- Constant Field Values
-
_moves
protected int _moves
-
_blockingOrder
protected int _blockingOrder
-
_alternateTrackId
protected java.lang.String _alternateTrackId
-
_comment
protected java.lang.String _comment
-
_typeList
protected java.util.List<java.lang.String> _typeList
-
_printCommentManifest
protected boolean _printCommentManifest
-
_printCommentSwitchList
protected boolean _printCommentSwitchList
-
_commentPickup
protected java.lang.String _commentPickup
-
_commentSetout
protected java.lang.String _commentSetout
-
_commentBoth
protected java.lang.String _commentBoth
-
_roadOption
protected java.lang.String _roadOption
-
_roadList
protected java.util.List<java.lang.String> _roadList
-
_loadOption
protected java.lang.String _loadOption
-
_loadList
protected java.util.List<java.lang.String> _loadList
-
_shipLoadOption
protected java.lang.String _shipLoadOption
-
_shipLoadList
protected java.util.List<java.lang.String> _shipLoadList
-
_destinationOption
protected java.lang.String _destinationOption
-
_destinationIdList
protected java.util.List<java.lang.String> _destinationIdList
-
_scheduleName
protected java.lang.String _scheduleName
-
_scheduleId
protected java.lang.String _scheduleId
-
_scheduleItemId
protected java.lang.String _scheduleItemId
-
_scheduleCount
protected int _scheduleCount
-
_reservedEnRoute
protected int _reservedEnRoute
-
_reservationFactor
protected int _reservationFactor
-
_mode
protected int _mode
-
_holdCustomLoads
protected boolean _holdCustomLoads
-
_dropOption
protected java.lang.String _dropOption
-
_pickupOption
protected java.lang.String _pickupOption
-
ANY
public static final java.lang.String ANY
- See Also:
- Constant Field Values
-
TRAINS
public static final java.lang.String TRAINS
- See Also:
- Constant Field Values
-
ROUTES
public static final java.lang.String ROUTES
- See Also:
- Constant Field Values
-
EXCLUDE_TRAINS
public static final java.lang.String EXCLUDE_TRAINS
- See Also:
- Constant Field Values
-
EXCLUDE_ROUTES
public static final java.lang.String EXCLUDE_ROUTES
- See Also:
- Constant Field Values
-
_dropList
protected java.util.List<java.lang.String> _dropList
-
_pickupList
protected java.util.List<java.lang.String> _pickupList
-
_loadOptions
protected int _loadOptions
-
_blockOptions
protected int _blockOptions
-
_order
protected java.lang.String _order
-
NORMAL
public static final java.lang.String NORMAL
-
FIFO
public static final java.lang.String FIFO
-
LIFO
public static final java.lang.String LIFO
-
_trackPriority
protected java.lang.String _trackPriority
-
PRIORITY_HIGH
public static final java.lang.String PRIORITY_HIGH
-
PRIORITY_MEDIUM
public static final java.lang.String PRIORITY_MEDIUM
-
PRIORITY_NORMAL
public static final java.lang.String PRIORITY_NORMAL
-
PRIORITY_LOW
public static final java.lang.String PRIORITY_LOW
-
STAGING
public static final java.lang.String STAGING
- See Also:
- Constant Field Values
-
INTERCHANGE
public static final java.lang.String INTERCHANGE
- See Also:
- Constant Field Values
-
YARD
public static final java.lang.String YARD
- See Also:
- Constant Field Values
-
SPUR
public static final java.lang.String SPUR
- See Also:
- Constant Field Values
-
EAST
public static final int EAST
- See Also:
- Constant Field Values
-
WEST
public static final int WEST
- See Also:
- Constant Field Values
-
NORTH
public static final int NORTH
- See Also:
- Constant Field Values
-
SOUTH
public static final int SOUTH
- See Also:
- Constant Field Values
-
ALL_ROADS
public static final java.lang.String ALL_ROADS
-
INCLUDE_ROADS
public static final java.lang.String INCLUDE_ROADS
-
EXCLUDE_ROADS
public static final java.lang.String EXCLUDE_ROADS
-
ALL_LOADS
public static final java.lang.String ALL_LOADS
-
INCLUDE_LOADS
public static final java.lang.String INCLUDE_LOADS
-
EXCLUDE_LOADS
public static final java.lang.String EXCLUDE_LOADS
-
ALL_DESTINATIONS
public static final java.lang.String ALL_DESTINATIONS
-
INCLUDE_DESTINATIONS
public static final java.lang.String INCLUDE_DESTINATIONS
-
EXCLUDE_DESTINATIONS
public static final java.lang.String EXCLUDE_DESTINATIONS
-
_onlyCarsWithFD
protected boolean _onlyCarsWithFD
-
SEQUENTIAL
public static final int SEQUENTIAL
- See Also:
- Constant Field Values
-
MATCH
public static final int MATCH
- See Also:
- Constant Field Values
-
PICKUP_OKAY
public static final java.lang.String PICKUP_OKAY
- See Also:
- Constant Field Values
-
_minimumLength
protected int _minimumLength
-
_maximumLength
protected int _maximumLength
-
OKAY
public static final java.lang.String OKAY
-
LENGTH
public static final java.lang.String LENGTH
-
TYPE
public static final java.lang.String TYPE
-
ROAD
public static final java.lang.String ROAD
-
LOAD
public static final java.lang.String LOAD
-
CAPACITY
public static final java.lang.String CAPACITY
-
SCHEDULE
public static final java.lang.String SCHEDULE
-
CUSTOM
public static final java.lang.String CUSTOM
-
DESTINATION
public static final java.lang.String DESTINATION
-
NO_FINAL_DESTINATION
public static final java.lang.String NO_FINAL_DESTINATION
-
TYPES_CHANGED_PROPERTY
public static final java.lang.String TYPES_CHANGED_PROPERTY
- See Also:
- Constant Field Values
-
ROADS_CHANGED_PROPERTY
public static final java.lang.String ROADS_CHANGED_PROPERTY
- See Also:
- Constant Field Values
-
NAME_CHANGED_PROPERTY
public static final java.lang.String NAME_CHANGED_PROPERTY
- See Also:
- Constant Field Values
-
LENGTH_CHANGED_PROPERTY
public static final java.lang.String LENGTH_CHANGED_PROPERTY
- See Also:
- Constant Field Values
-
MIN_LENGTH_CHANGED_PROPERTY
public static final java.lang.String MIN_LENGTH_CHANGED_PROPERTY
- See Also:
- Constant Field Values
-
MAX_LENGTH_CHANGED_PROPERTY
public static final java.lang.String MAX_LENGTH_CHANGED_PROPERTY
- See Also:
- Constant Field Values
-
SCHEDULE_CHANGED_PROPERTY
public static final java.lang.String SCHEDULE_CHANGED_PROPERTY
- See Also:
- Constant Field Values
-
DISPOSE_CHANGED_PROPERTY
public static final java.lang.String DISPOSE_CHANGED_PROPERTY
- See Also:
- Constant Field Values
-
TRAIN_DIRECTION_CHANGED_PROPERTY
public static final java.lang.String TRAIN_DIRECTION_CHANGED_PROPERTY
- See Also:
- Constant Field Values
-
DROP_CHANGED_PROPERTY
public static final java.lang.String DROP_CHANGED_PROPERTY
- See Also:
- Constant Field Values
-
PICKUP_CHANGED_PROPERTY
public static final java.lang.String PICKUP_CHANGED_PROPERTY
- See Also:
- Constant Field Values
-
TRACK_TYPE_CHANGED_PROPERTY
public static final java.lang.String TRACK_TYPE_CHANGED_PROPERTY
- See Also:
- Constant Field Values
-
LOADS_CHANGED_PROPERTY
public static final java.lang.String LOADS_CHANGED_PROPERTY
- See Also:
- Constant Field Values
-
POOL_CHANGED_PROPERTY
public static final java.lang.String POOL_CHANGED_PROPERTY
- See Also:
- Constant Field Values
-
PLANNED_PICKUPS_CHANGED_PROPERTY
public static final java.lang.String PLANNED_PICKUPS_CHANGED_PROPERTY
- See Also:
- Constant Field Values
-
LOAD_OPTIONS_CHANGED_PROPERTY
public static final java.lang.String LOAD_OPTIONS_CHANGED_PROPERTY
- See Also:
- Constant Field Values
-
DESTINATIONS_CHANGED_PROPERTY
public static final java.lang.String DESTINATIONS_CHANGED_PROPERTY
- See Also:
- Constant Field Values
-
DESTINATION_OPTIONS_CHANGED_PROPERTY
public static final java.lang.String DESTINATION_OPTIONS_CHANGED_PROPERTY
- See Also:
- Constant Field Values
-
SCHEDULE_MODE_CHANGED_PROPERTY
public static final java.lang.String SCHEDULE_MODE_CHANGED_PROPERTY
- See Also:
- Constant Field Values
-
SCHEDULE_ID_CHANGED_PROPERTY
public static final java.lang.String SCHEDULE_ID_CHANGED_PROPERTY
- See Also:
- Constant Field Values
-
SERVICE_ORDER_CHANGED_PROPERTY
public static final java.lang.String SERVICE_ORDER_CHANGED_PROPERTY
- See Also:
- Constant Field Values
-
ALTERNATE_TRACK_CHANGED_PROPERTY
public static final java.lang.String ALTERNATE_TRACK_CHANGED_PROPERTY
- See Also:
- Constant Field Values
-
TRACK_BLOCKING_ORDER_CHANGED_PROPERTY
public static final java.lang.String TRACK_BLOCKING_ORDER_CHANGED_PROPERTY
- See Also:
- Constant Field Values
-
TRACK_REPORTER_CHANGED_PROPERTY
public static final java.lang.String TRACK_REPORTER_CHANGED_PROPERTY
- See Also:
- Constant Field Values
-
ROUTED_CHANGED_PROPERTY
public static final java.lang.String ROUTED_CHANGED_PROPERTY
- See Also:
- Constant Field Values
-
HOLD_CARS_CHANGED_PROPERTY
public static final java.lang.String HOLD_CARS_CHANGED_PROPERTY
- See Also:
- Constant Field Values
-
TRACK_COMMENT_CHANGED_PROPERTY
public static final java.lang.String TRACK_COMMENT_CHANGED_PROPERTY
- See Also:
- Constant Field Values
-
TRACK_FACTOR_CHANGED_PROPERTY
public static final java.lang.String TRACK_FACTOR_CHANGED_PROPERTY
- See Also:
- Constant Field Values
-
PRIORITY_CHANGED_PROPERTY
public static final java.lang.String PRIORITY_CHANGED_PROPERTY
- See Also:
- Constant Field Values
-
TRAIN_SCHEDULE
public static final java.lang.String TRAIN_SCHEDULE
- See Also:
- Constant Field Values
-
ALL
public static final java.lang.String ALL
- See Also:
- Constant Field Values
-
-
Method Detail
-
copyTrack
public Track copyTrack(java.lang.String newName, Location newLocation)
Creates a copy of this track.- Parameters:
newName- The name of the new track.newLocation- The location of the new track.- Returns:
- Track
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getId
public java.lang.String getId()
-
getLocation
public Location getLocation()
-
setName
public void setName(java.lang.String name)
-
getName
public java.lang.String getName()
-
getSplitName
public java.lang.String getSplitName()
-
getDivision
public Division getDivision()
-
getDivisionName
public java.lang.String getDivisionName()
-
isSpur
public boolean isSpur()
-
isYard
public boolean isYard()
-
isInterchange
public boolean isInterchange()
-
isStaging
public boolean isStaging()
-
hasMessages
public boolean hasMessages()
-
getTrackType
public java.lang.String getTrackType()
Gets the track type- Returns:
- Track.SPUR Track.YARD Track.INTERCHANGE or Track.STAGING
-
setTrackType
public void setTrackType(java.lang.String type)
Sets the track type, spur, interchange, yard, staging- Parameters:
type- Track.SPUR Track.YARD Track.INTERCHANGE Track.STAGING
-
getTrackTypeName
public java.lang.String getTrackTypeName()
-
getTrackTypeName
public static java.lang.String getTrackTypeName(java.lang.String trackType)
-
setLength
public void setLength(int length)
-
getLength
public int getLength()
-
setPoolMinimumLength
public void setPoolMinimumLength(int length)
Sets the minimum length of this track when the track is in a pool.- Parameters:
length- minimum
-
getPoolMinimumLength
public int getPoolMinimumLength()
-
setPoolMaximumLength
public void setPoolMaximumLength(int length)
Sets the maximum length of this track when the track is in a pool.- Parameters:
length- maximum
-
getPoolMaximumLength
public int getPoolMaximumLength()
-
setReserved
protected void setReserved(int reserved)
The amount of track space that is reserved for car drops or pick ups. Can be positive or negative.- Parameters:
reserved- the calculated track space
-
getReserved
public int getReserved()
-
addReservedInRoute
public void addReservedInRoute(Car car)
-
deleteReservedInRoute
public void deleteReservedInRoute(Car car)
-
getReservedInRoute
public int getReservedInRoute()
Used to determine how much track space is going to be consumed by cars in route to this track. See isSpaceAvailable().- Returns:
- The length of all cars en route to this track including couplers.
-
getNumberOfCarsInRoute
public int getNumberOfCarsInRoute()
-
setReservationFactor
public void setReservationFactor(int factor)
Set the reservation factor. Default 100 (100%). Used by the program when generating car loads from staging. A factor of 100% allows the program to fill a track with car loads. Numbers over 100% can overload a track.- Parameters:
factor- A number from 0 to 10000.
-
getReservationFactor
public int getReservationFactor()
-
setScheduleMode
public void setScheduleMode(int mode)
Sets the mode of operation for the schedule assigned to this track.- Parameters:
mode- Track.SEQUENTIAL or Track.MATCH
-
getScheduleMode
public int getScheduleMode()
Gets the mode of operation for the schedule assigned to this track.- Returns:
- Mode of operation: Track.SEQUENTIAL or Track.MATCH
-
getScheduleModeName
public java.lang.String getScheduleModeName()
-
setAlternateTrack
public void setAlternateTrack(Track track)
-
getAlternateTrack
public Track getAlternateTrack()
Returns the alternate track for a spur- Returns:
- alternate track
-
setHoldCarsWithCustomLoadsEnabled
public void setHoldCarsWithCustomLoadsEnabled(boolean enable)
-
isHoldCarsWithCustomLoadsEnabled
public boolean isHoldCarsWithCustomLoadsEnabled()
If enabled (true), hold cars with custom loads rather than allowing them to go to staging if the spur and the alternate track were full. If disabled, cars with custom loads can be forwarded to staging when this spur and all others with this option are also false.- Returns:
- True if enabled
-
isSpaceAvailable
public boolean isSpaceAvailable(Car car)
Used to determine if there's space available at this track for the car. Considers cars en-route to this track. Used to prevent overloading the track.- Parameters:
car- The car to be set out.- Returns:
- true if space available.
-
setUsedLength
public void setUsedLength(int length)
-
getUsedLength
public int getUsedLength()
-
setIgnoreUsedLengthPercentage
public void setIgnoreUsedLengthPercentage(int percentage)
The amount of consumed track space to be ignored when sending new rolling stock to the track. See Planned Pickups in help.- Parameters:
percentage- a number between 0 and 100
-
getIgnoreUsedLengthPercentage
public int getIgnoreUsedLengthPercentage()
-
getNumberRS
public int getNumberRS()
- Returns:
- The number of rolling stock (cars and engines) on this track
-
getNumberCars
public int getNumberCars()
- Returns:
- The number of cars on this track
-
getNumberEngines
public int getNumberEngines()
- Returns:
- The number of engines on this track
-
addRS
public void addRS(RollingStock rs)
Adds rolling stock to a specific track.- Parameters:
rs- The rolling stock to place on the track.
-
deleteRS
public void deleteRS(RollingStock rs)
-
addPickupRS
public void addPickupRS(RollingStock rs)
Increments the number of cars and or engines that will be picked up by a train from this track.- Parameters:
rs- The rolling stock.
-
deletePickupRS
public void deletePickupRS(RollingStock rs)
-
getPickupRS
public int getPickupRS()
- Returns:
- the number of rolling stock (cars and or locos) that are scheduled for pick up from this track.
-
getReservedLengthPickups
public int getReservedLengthPickups()
-
addDropRS
public void addDropRS(RollingStock rs)
-
deleteDropRS
public void deleteDropRS(RollingStock rs)
-
getDropRS
public int getDropRS()
-
getReservedLengthSetouts
public int getReservedLengthSetouts()
-
setComment
public void setComment(java.lang.String comment)
-
getComment
public java.lang.String getComment()
-
setCommentPickup
public void setCommentPickup(java.lang.String comment)
-
getCommentPickup
public java.lang.String getCommentPickup()
-
getCommentPickupWithColor
public java.lang.String getCommentPickupWithColor()
-
setCommentSetout
public void setCommentSetout(java.lang.String comment)
-
getCommentSetout
public java.lang.String getCommentSetout()
-
getCommentSetoutWithColor
public java.lang.String getCommentSetoutWithColor()
-
setCommentBoth
public void setCommentBoth(java.lang.String comment)
-
getCommentBoth
public java.lang.String getCommentBoth()
-
getCommentBothWithColor
public java.lang.String getCommentBothWithColor()
-
isPrintManifestCommentEnabled
public boolean isPrintManifestCommentEnabled()
-
setPrintManifestCommentEnabled
public void setPrintManifestCommentEnabled(boolean enable)
-
isPrintSwitchListCommentEnabled
public boolean isPrintSwitchListCommentEnabled()
-
setPrintSwitchListCommentEnabled
public void setPrintSwitchListCommentEnabled(boolean enable)
-
getTypeNames
public java.lang.String[] getTypeNames()
Returns all of the rolling stock type names serviced by this track.- Returns:
- rolling stock type names
-
addTypeName
public void addTypeName(java.lang.String type)
-
deleteTypeName
public void deleteTypeName(java.lang.String type)
-
isTypeNameAccepted
public boolean isTypeNameAccepted(java.lang.String type)
-
setTrainDirections
public void setTrainDirections(int direction)
Sets the train directions that can service this track- Parameters:
direction- EAST, WEST, NORTH, SOUTH
-
getTrainDirections
public int getTrainDirections()
-
getRoadOption
public java.lang.String getRoadOption()
-
getRoadOptionString
public java.lang.String getRoadOptionString()
-
setRoadOption
public void setRoadOption(java.lang.String option)
Set the road option for this track.- Parameters:
option- ALLROADS, INCLUDEROADS, or EXCLUDEROADS
-
getRoadNames
public java.lang.String[] getRoadNames()
-
addRoadName
public void addRoadName(java.lang.String road)
-
deleteRoadName
public void deleteRoadName(java.lang.String road)
-
isRoadNameAccepted
public boolean isRoadNameAccepted(java.lang.String road)
-
containsRoadName
public boolean containsRoadName(java.lang.String road)
-
getLoadOption
public java.lang.String getLoadOption()
Gets the car receive load option for this track.- Returns:
- ALL_LOADS INCLUDE_LOADS EXCLUDE_LOADS
-
getLoadOptionString
public java.lang.String getLoadOptionString()
-
setLoadOption
public void setLoadOption(java.lang.String option)
Set how this track deals with receiving car loads- Parameters:
option- ALL_LOADS INCLUDE_LOADS EXCLUDE_LOADS
-
getLoadNames
public java.lang.String[] getLoadNames()
Provides a list of receive loads that the track will either service or exclude. See setLoadOption- Returns:
- Array of load names as Strings
-
addLoadName
public void addLoadName(java.lang.String load)
Add a receive load that the track will either service or exclude. See setLoadOption- Parameters:
load- The string load name.
-
deleteLoadName
public void deleteLoadName(java.lang.String load)
Delete a receive load name that the track will either service or exclude. See setLoadOption- Parameters:
load- The string load name.
-
isLoadNameAccepted
public boolean isLoadNameAccepted(java.lang.String load)
Determine if track will service a specific receive load name.- Parameters:
load- the load name to check.- Returns:
- true if track will service this load.
-
isLoadNameAndCarTypeAccepted
public boolean isLoadNameAndCarTypeAccepted(java.lang.String load, java.lang.String type)
Determine if track will service a specific receive load and car type.- Parameters:
load- the load name to check.type- the type of car used to carry the load.- Returns:
- true if track will service this load.
-
getShipLoadOption
public java.lang.String getShipLoadOption()
Gets the car ship load option for this track.- Returns:
- ALL_LOADS INCLUDE_LOADS EXCLUDE_LOADS
-
getShipLoadOptionString
public java.lang.String getShipLoadOptionString()
-
setShipLoadOption
public void setShipLoadOption(java.lang.String option)
Set how this track deals with shipping car loads- Parameters:
option- ALL_LOADS INCLUDE_LOADS EXCLUDE_LOADS
-
getShipLoadNames
public java.lang.String[] getShipLoadNames()
Provides a list of ship loads that the track will either service or exclude. See setShipLoadOption- Returns:
- Array of load names as Strings
-
addShipLoadName
public void addShipLoadName(java.lang.String load)
Add a ship load that the track will either service or exclude. See setShipLoadOption- Parameters:
load- The string load name.
-
deleteShipLoadName
public void deleteShipLoadName(java.lang.String load)
Delete a ship load name that the track will either service or exclude. See setLoadOption- Parameters:
load- The string load name.
-
isLoadNameShipped
public boolean isLoadNameShipped(java.lang.String load)
Determine if track will service a specific ship load name.- Parameters:
load- the load name to check.- Returns:
- true if track will service this load.
-
isLoadNameAndCarTypeShipped
public boolean isLoadNameAndCarTypeShipped(java.lang.String load, java.lang.String type)
Determine if track will service a specific ship load and car type.- Parameters:
load- the load name to check.type- the type of car used to carry the load.- Returns:
- true if track will service this load.
-
getDropOption
public java.lang.String getDropOption()
Gets the drop option for this track. ANY means that all trains and routes can drop cars to this track. The other four options are used to restrict the track to certain trains or routes.- Returns:
- ANY, TRAINS, ROUTES, EXCLUDE_TRAINS, or EXCLUDE_ROUTES
-
setDropOption
public void setDropOption(java.lang.String option)
Set the car drop option for this track.- Parameters:
option- ANY, TRAINS, ROUTES, EXCLUDE_TRAINS, or EXCLUDE_ROUTES
-
getPickupOption
public java.lang.String getPickupOption()
Gets the pickup option for this track. ANY means that all trains and routes can pull cars from this track. The other four options are used to restrict the track to certain trains or routes.- Returns:
- ANY, TRAINS, ROUTES, EXCLUDE_TRAINS, or EXCLUDE_ROUTES
-
setPickupOption
public void setPickupOption(java.lang.String option)
Set the car pick up option for this track.- Parameters:
option- ANY, TRAINS, ROUTES, EXCLUDE_TRAINS, or EXCLUDE_ROUTES
-
getDropIds
public java.lang.String[] getDropIds()
-
addDropId
public void addDropId(java.lang.String id)
-
deleteDropId
public void deleteDropId(java.lang.String id)
-
isDropTrainAccepted
public boolean isDropTrainAccepted(Train train)
Determine if train can set out cars to this track. Based on the train's id or train's route id. See setDropOption(option).- Parameters:
train- The Train to test.- Returns:
- true if the train can set out cars to this track.
-
isDropRouteAccepted
public boolean isDropRouteAccepted(Route route)
-
containsDropId
public boolean containsDropId(java.lang.String id)
-
getPickupIds
public java.lang.String[] getPickupIds()
-
addPickupId
public void addPickupId(java.lang.String id)
Add train or route id to this track.- Parameters:
id- The string id for the train or route.
-
deletePickupId
public void deletePickupId(java.lang.String id)
-
isPickupTrainAccepted
public boolean isPickupTrainAccepted(Train train)
Determine if train can pick up cars from this track. Based on the train's id or train's route id. See setPickupOption(option).- Parameters:
train- The Train to test.- Returns:
- true if the train can pick up cars from this track.
-
isPickupRouteAccepted
public boolean isPickupRouteAccepted(Route route)
-
containsPickupId
public boolean containsPickupId(java.lang.String id)
-
checkPickups
public java.lang.String checkPickups()
Checks to see if all car types can be pulled from this track- Returns:
- PICKUP_OKAY if any train can pull all car types from this track
-
getTrackPriority
public java.lang.String getTrackPriority()
A track has four priorities: PRIORITY_HIGH, PRIORITY_MEDIUM, PRIORITY_NORMAL, and PRIORITY_LOW. Cars are serviced from a location based on the track priority. Default is normal.- Returns:
- track priority
-
setTrackPriority
public void setTrackPriority(java.lang.String priority)
-
isRollingStockAccepted
public java.lang.String isRollingStockAccepted(RollingStock rs)
Used to determine if track can service the rolling stock.- Parameters:
rs- the car or loco to be tested- Returns:
- Error string starting with TYPE, ROAD, CAPACITY, LENGTH, DESTINATION or LOAD if there's an issue. OKAY if track can service Rolling Stock.
-
getAvailableTrackSpace
public int getAvailableTrackSpace()
Available track space. Adjusted when a track is using the planned pickups feature- Returns:
- available track space
-
getMoves
public int getMoves()
-
setMoves
public void setMoves(int moves)
-
bumpMoves
public void bumpMoves()
-
getBlockingOrder
public int getBlockingOrder()
Gets the blocking order for this track. Default is zero, in that case, tracks are sorted by name.- Returns:
- the blocking order
-
setBlockingOrder
public void setBlockingOrder(int order)
-
getServiceOrder
public java.lang.String getServiceOrder()
Get the service order for this track. Yards and interchange have this feature for cars. Staging has this feature for trains.- Returns:
- Service order: Track.NORMAL, Track.FIFO, Track.LIFO
-
setServiceOrder
public void setServiceOrder(java.lang.String order)
Set the service order for this track. Only yards and interchange have this feature.- Parameters:
order- Track.NORMAL, Track.FIFO, Track.LIFO
-
getScheduleName
public java.lang.String getScheduleName()
Returns the name of the schedule. Note that this returns the schedule name based on the schedule's id. A schedule's name can be modified by the user.- Returns:
- Schedule name
-
getSchedule
public Schedule getSchedule()
-
setSchedule
public void setSchedule(Schedule schedule)
-
getScheduleId
public java.lang.String getScheduleId()
-
setScheduleId
public void setScheduleId(java.lang.String id)
-
getScheduleItemId
public java.lang.String getScheduleItemId()
Recommend getCurrentScheduleItem() to get the current schedule item for this track. Protects against user deleting a schedule item from the schedule.- Returns:
- schedule item id
-
setScheduleItemId
public void setScheduleItemId(java.lang.String id)
-
getCurrentScheduleItem
public ScheduleItem getCurrentScheduleItem()
Get's the current schedule item for this track Protects against user deleting an item in a shared schedule. Recommend using this versus getScheduleItemId() as the id can be obsolete.- Returns:
- The current ScheduleItem.
-
bumpSchedule
public void bumpSchedule()
Increments the schedule count if there's a schedule and the schedule is running in sequential mode. Resets the schedule count if the maximum is reached and then goes to the next item in the schedule's list.
-
getNextScheduleItem
public ScheduleItem getNextScheduleItem()
-
getScheduleCount
public int getScheduleCount()
Returns how many times the current schedule item has been accessed.- Returns:
- count
-
setScheduleCount
public void setScheduleCount(int count)
-
checkScheduleValid
public java.lang.String checkScheduleValid()
Check to see if schedule is valid for the track at this location.- Returns:
- SCHEDULE_OKAY if schedule okay, otherwise an error message.
-
checkSchedule
public java.lang.String checkSchedule(Car car)
Checks to see if car can be placed on this spur using this schedule. Returns OKAY if the schedule can service the car.- Parameters:
car- The Car to be tested.- Returns:
- Track.OKAY track.CUSTOM track.SCHEDULE
-
scheduleNext
public java.lang.String scheduleNext(Car car)
Check to see if track has schedule and if it does will schedule the next item in the list. Load the car with the next schedule load if one exists, and set the car's final destination if there's one in the schedule.- Parameters:
car- The Car to be modified.- Returns:
- Track.OKAY or Track.SCHEDULE
-
checkScheduleAttribute
public boolean checkScheduleAttribute(java.lang.String attribute, java.lang.String carType, Car car)
-
setLoadSwapEnabled
public void setLoadSwapEnabled(boolean enable)
Enable changing the car generic load state when car arrives at this track.- Parameters:
enable- when true, swap generic car load state
-
isLoadSwapEnabled
public boolean isLoadSwapEnabled()
-
setLoadEmptyEnabled
public void setLoadEmptyEnabled(boolean enable)
Enable setting the car generic load state to empty when car arrives at this track.- Parameters:
enable- when true, set generic car load to empty
-
isLoadEmptyEnabled
public boolean isLoadEmptyEnabled()
-
setRemoveCustomLoadsEnabled
public void setRemoveCustomLoadsEnabled(boolean enable)
When enabled, remove Scheduled car loads.- Parameters:
enable- when true, remove Scheduled loads from cars
-
isRemoveCustomLoadsEnabled
public boolean isRemoveCustomLoadsEnabled()
-
setAddCustomLoadsEnabled
public void setAddCustomLoadsEnabled(boolean enable)
When enabled, add custom car loads if there's a demand.- Parameters:
enable- when true, add custom loads to cars
-
isAddCustomLoadsEnabled
public boolean isAddCustomLoadsEnabled()
-
setAddCustomLoadsAnySpurEnabled
public void setAddCustomLoadsAnySpurEnabled(boolean enable)
When enabled, add custom car loads if there's a demand by any spur/industry.- Parameters:
enable- when true, add custom loads to cars
-
isAddCustomLoadsAnySpurEnabled
public boolean isAddCustomLoadsAnySpurEnabled()
-
setAddCustomLoadsAnyStagingTrackEnabled
public void setAddCustomLoadsAnyStagingTrackEnabled(boolean enable)
When enabled, add custom car loads to cars in staging for new destinations that are staging.- Parameters:
enable- when true, add custom load to car
-
isAddCustomLoadsAnyStagingTrackEnabled
public boolean isAddCustomLoadsAnyStagingTrackEnabled()
-
isModifyLoadsEnabled
public boolean isModifyLoadsEnabled()
-
setDisableLoadChangeEnabled
public void setDisableLoadChangeEnabled(boolean enable)
-
isDisableLoadChangeEnabled
public boolean isDisableLoadChangeEnabled()
-
setQuickServiceEnabled
public void setQuickServiceEnabled(boolean enable)
-
isQuickServiceEnabled
public boolean isQuickServiceEnabled()
-
setBlockCarsEnabled
public void setBlockCarsEnabled(boolean enable)
-
isBlockCarsEnabled
public boolean isBlockCarsEnabled()
When enabled block cars from staging.- Returns:
- true if blocking is enabled.
-
getPoolName
public java.lang.String getPoolName()
-
getDestinationListSize
public int getDestinationListSize()
-
addDestination
public void addDestination(Location destination)
adds a location to the list of acceptable destinations for this track.- Parameters:
destination- location that is acceptable
-
deleteDestination
public void deleteDestination(Location destination)
-
isDestinationAccepted
public boolean isDestinationAccepted(Location destination)
Returns true if destination is valid from this track.- Parameters:
destination- The Location to be checked.- Returns:
- true if track services the destination
-
setDestinationIds
public void setDestinationIds(java.lang.String[] ids)
-
getDestinationIds
public java.lang.String[] getDestinationIds()
-
setDestinationOption
public void setDestinationOption(java.lang.String option)
Sets the destination option for this track. The three options are:ALL_DESTINATIONS which means this track services all destinations, the default.
INCLUDE_DESTINATIONS which means this track services only certain destinations.
EXCLUDE_DESTINATIONS which means this track does not service certain destinations.
- Parameters:
option- Track.ALL_DESTINATIONS, Track.INCLUDE_DESTINATIONS, or Track.EXCLUDE_DESTINATIONS
-
getDestinationOption
public java.lang.String getDestinationOption()
Get destination option for interchange or staging track- Returns:
- option
-
setOnlyCarsWithFinalDestinationEnabled
public void setOnlyCarsWithFinalDestinationEnabled(boolean enable)
-
isOnlyCarsWithFinalDestinationEnabled
public boolean isOnlyCarsWithFinalDestinationEnabled()
When true the track will only accept cars that have a final destination that can be serviced by the track. See acceptsDestination(Location).- Returns:
- false if any car spotted, true if only cars with a FD.
-
isAlternate
public boolean isAlternate()
Used to determine if track has been assigned as an alternate- Returns:
- true if track is an alternate
-
dispose
public void dispose()
-
store
public org.jdom2.Element store()
Create an XML element to represent this Entry. This member has to remain synchronized with the detailed DTD in operations-location.dtd.- Returns:
- Contents in a JDOM Element
-
setDirtyAndFirePropertyChange
protected void setDirtyAndFirePropertyChange(java.lang.String p, java.lang.Object old, java.lang.Object n)
-
setReporter
public void setReporter(Reporter r)
-
getReporter
public Reporter getReporter()
-
getReporterName
public java.lang.String getReporterName()
-
-