Class ScheduleItem
java.lang.Object
jmri.beans.PropertyChangeSupport
jmri.jmrit.operations.locations.schedules.ScheduleItem
- All Implemented Interfaces:
PropertyChangeListener,EventListener,PropertyChangeFirer,PropertyChangeProvider
Represents one schedule item of a schedule
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) doubleprotected Stringprotected intprotected Locationprotected intprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected intprotected Stringprotected Stringprotected Trackprotected Stringprotected intstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class jmri.beans.PropertyChangeSupport
propertyChangeSupport -
Constructor Summary
ConstructorsConstructorDescriptionScheduleItem(String id, String type) ScheduleItem(org.jdom2.Element e) Construct this Entry from XML. -
Method Summary
Modifier and TypeMethodDescriptionvoidvoiddispose()booleandoRandom()Method determines by random if a car is accepted by a scheduleItemdoubleintgetCount()How many times a car type needs to use the schedule item before going to the next item in the schedule.intgetHits()getId()intintgetWait()voidvoidsetComment(String comment) voidsetCount(int count) voidsetDestination(Location destination) voidsetDestinationTrack(Track track) voidsetHits(int hit) voidvoidvoidsetReceiveLoadName(String load) Sets the car load requested.voidsetRoadName(String road) Sets the requested car road name.voidsetSequenceId(int sequence) voidvoidsetShipLoadName(String load) Sets the car load that will ship.voidsetTypeName(String type) Sets the type of car requested.voidsetWait(int wait) org.jdom2.Elementstore()Create an XML element to represent this Entry.Methods inherited from class jmri.beans.PropertyChangeSupport
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Field Details
-
NONE
- See Also:
-
_id
-
_sequenceId
-
_random
-
_setoutTrainScheduleId
-
_type
-
_road
-
_load
-
_ship
-
_destination
-
_trackDestination
-
_pickupTrainScheduleId
-
_count
-
_wait
-
_hits
-
_comment
-
TRAIN_SCHEDULE_CHANGED_PROPERTY
- See Also:
-
COUNT_CHANGED_PROPERTY
- See Also:
-
TYPE_CHANGED_PROPERTY
- See Also:
-
ROAD_CHANGED_PROPERTY
- See Also:
-
LOAD_CHANGED_PROPERTY
- See Also:
-
DESTINATION_CHANGED_PROPERTY
- See Also:
-
DESTINATION_TRACK_CHANGED_PROPERTY
- See Also:
-
WAIT_CHANGED_PROPERTY
- See Also:
-
HITS_CHANGED_PROPERTY
- See Also:
-
DISPOSE
- See Also:
-
_calculatedRandom
double _calculatedRandom
-
-
Constructor Details
-
ScheduleItem
- Parameters:
id- ScheduleItem string idtype- car type for schedule
-
ScheduleItem
Construct this Entry from XML. This member has to remain synchronized with the detailed DTD in operations-config.xml- Parameters:
e- Consist XML element
-
-
Method Details
-
getId
-
getTypeName
-
setTypeName
Sets the type of car requested.- Parameters:
type- The car type requested.
-
getRandom
-
setRandom
-
doRandom
Method determines by random if a car is accepted by a scheduleItem- Returns:
- true if car is accepted by the scheduleItem
-
getCalculatedRandom
-
getSetoutTrainScheduleId
-
getSetoutTrainScheduleName
-
setSetoutTrainScheduleId
-
getPickupTrainScheduleId
-
getPickupTrainScheduleName
-
setPickupTrainScheduleId
-
getRoadName
-
setRoadName
Sets the requested car road name.- Parameters:
road- The car road requested.
-
setReceiveLoadName
Sets the car load requested.- Parameters:
load- The load name requested.
-
getReceiveLoadName
-
setShipLoadName
Sets the car load that will ship.- Parameters:
load- The car load shipped.
-
getShipLoadName
-
getSequenceId
-
setSequenceId
-
getCount
How many times a car type needs to use the schedule item before going to the next item in the schedule. Used in sequential mode. Default is one.- Returns:
- the number of times a car type needs to use the schedule item
-
setCount
-
getWait
-
setWait
-
getHits
-
setHits
-
getDestination
-
setDestination
-
getDestinationName
-
getDestinationId
-
getDestinationTrack
-
setDestinationTrack
-
getDestinationTrackName
-
getDestinationTrackId
-
setComment
-
getComment
-
copyScheduleItem
-
dispose
-
store
Create an XML element to represent this Entry. This member has to remain synchronized with the detailed DTD in operations-config.xml.- Returns:
- Contents in a JDOM Element
-
propertyChange
- Specified by:
propertyChangein interfacePropertyChangeListener
-