|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.TransitSection
public class TransitSection
This class holds information and options for a Section when assigned to a Transit. Corresponds to an allocatable "Section" of track assigned to a Transit.
An TransitSection holds the following information: Section ID Section Direction Sequence number of Section within the Transit Special action for train in this Section, if requested Data for special action, if needed Whether this Section is a primary section or an alternate section
A TransitSection is referenced via a list in its parent Transit, and is stored on disk when its parent Transit is stored.
Two Special Actions are currently defines, but more may be added Pause for a user set number of fast clock minutes after reaching the end of the assigned section. Wait after reaching the end of the assigned section until an external restart occurs.
Provides for delayed initializatio of Section when loading panel files, so that this is not dependent on order of items in the panel file.
| Field Summary | |
|---|---|
static int |
NONE
Constants representing the Special Action requested for this Section |
static int |
PAUSE
|
static int |
WAIT
|
| Constructor Summary | |
|---|---|
TransitSection(Section s,
int seq,
int direction)
Main constructor method |
|
TransitSection(Section s,
int seq,
int direction,
int act,
int data,
boolean alt)
Convenience constructor |
|
TransitSection(String secName,
int seq,
int direction,
int act,
int data,
boolean alt)
Special constructor to delay Section initialization |
|
| Method Summary | |
|---|---|
int |
getAction()
|
int |
getData()
|
int |
getDirection()
|
Section |
getSection()
Access methods |
String |
getSectionName()
|
int |
getSequenceNumber()
|
boolean |
isAlternate()
|
void |
setAction(int act)
|
void |
setAlternate(boolean alt)
|
void |
setData(int data)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int NONE
public static final int PAUSE
public static final int WAIT
| Constructor Detail |
|---|
public TransitSection(Section s,
int seq,
int direction)
public TransitSection(Section s,
int seq,
int direction,
int act,
int data,
boolean alt)
public TransitSection(String secName,
int seq,
int direction,
int act,
int data,
boolean alt)
| Method Detail |
|---|
public Section getSection()
public String getSectionName()
public int getDirection()
public int getSequenceNumber()
public int getAction()
public void setAction(int act)
public int getData()
public void setData(int data)
public boolean isAlternate()
public void setAlternate(boolean alt)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||