Package jmri.jmrit.logix
Class OPath
java.lang.Object
jmri.Path
jmri.jmrit.logix.OPath
- All Implemented Interfaces:
Comparable<Path>
Extends jmri.Path. An OPath is a route that traverses a Block from one
boundary to another. The dest parameter of Path (renamed to owner) is
used to reference the Block to which this OPath belongs. (Not a
destination Block as might be inferred from the naming in Path.java)
An OPath inherits the List of BeanSettings for all the turnouts needed to traverse the Block. It also has references to the Portals (block boundary objects) through which it enters or exits the block. One of these may be null, if the OPath dead ends within the block.
-
Field Summary
Fields inherited from class jmri.Path
CCW, CW, DOWN, EAST, LEFT, NONE, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, UP, WEST -
Constructor Summary
ConstructorsConstructorDescriptionCreate an OPath object with default directions of NONE, and no setting element.Create an OPath object with default directions of NONE, and no setting element. -
Method Summary
Modifier and TypeMethodDescriptionvoidDoes not allow duplicate settings.voiddispose()booleanOverride to indicate logical equality for use as paths in OBlocks.getName()protected StringgetOppositePortalName(String name) inthashCode()voidvoidvoidvoidsetTurnouts(int delay, boolean set, int lockState, boolean lock) Set path turnout commanded state and lock statetoString()Methods inherited from class jmri.Path
checkPathSet, clearSettings, compareTo, computeDirection, decodeDirection, getBlock, getFromBlockDirection, getLength, getLengthCm, getLengthIn, getLengthMm, getSettings, getToBlockDirection, removeSetting, reverseDirection, setBlock, setFromBlockDirection, setLength, setToBlockDirection
-
Constructor Details
-
OPath
Create an OPath object with default directions of NONE, and no setting element.- Parameters:
owner- Block owning the pathname- name of the path
-
OPath
Create an OPath object with default directions of NONE, and no setting element.- Parameters:
owner- Block owning the pathname- name of the pathentry- Portal where path entersexit- Portal where path exitssettings- array of turnout settings of the path
-
-
Method Details
-
getOppositePortalName
-
setName
-
getName
-
setFromPortal
-
getFromPortal
-
setToPortal
-
getToPortal
-
setTurnouts
Set path turnout commanded state and lock state- Parameters:
delay- following actions in secondsset- when true, command turnout to settings, false don't set command - just do lock settinglockState- set when lock==true, lockState unset when lock==falselock- If lockState==0 setLocked() is not called. (lockState should be 1,2,3)
-
dispose
-
getDescription
-
toString
-
addSetting
Does not allow duplicate settings.- Overrides:
addSettingin classPath
-
hashCode
-
equals
Override to indicate logical equality for use as paths in OBlocks.
-