Class TSTrain

java.lang.Object
  extended by TSOpts
      extended by TSData
          extended by TSTrain
All Implemented Interfaces:
java.io.Serializable

 class TSTrain
extends TSData

.

======================================================================
 Class TSTrain -- Train-definition used within activity/consist
 ##TSTrain (Eyecatcher)
======================================================================
 


Field Summary
private  int Cnt
           
private  java.lang.String FNme
           
protected static java.lang.String IdStr
           
private  java.lang.String Name
           
private  java.util.ArrayList<TSRefC> TOT
           
 
Constructor Summary
protected TSTrain()
          .
protected TSTrain(java.lang.String fn)
          .
 
Method Summary
protected  java.lang.String chgNme(java.lang.String tn)
          .
protected  java.util.Iterator<java.lang.String> crTrn(java.util.ArrayList<java.lang.String> LneT, java.lang.String prfx)
          .
protected  java.io.File getFile(java.io.File dir)
          .
protected  java.lang.String getName(boolean mde)
          .
protected static java.io.File getPath(TSRefC cT, java.io.File cP)
          .
protected  java.util.ArrayList<TSRefC> getTObjT(int c)
          .
protected  int incCnt(int inc)
          .
protected  java.lang.String toStr()
          .
 
Methods inherited from class TSData
addDta, addObj, cr$Obj, get$Obj, getDta, getDta, getFlt, getInt, getInt, getObj, getOpt, getQue, setDta, setDta, setFlt, setInt, setInt, setObj
 
Methods inherited from class TSOpts
$init, chkMsk, chkMsk, clrMsk, clrMsk, cntMsk, cntMsk, fndMsk, getMsk, orMsk, orMsk, prtMsk, resMsk, setMsk, setMsk, tstMsk
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IdStr

protected static final java.lang.String IdStr
See Also:
Constant Field Values

FNme

private java.lang.String FNme

Name

private java.lang.String Name

Cnt

private int Cnt

TOT

private java.util.ArrayList<TSRefC> TOT
Constructor Detail

TSTrain

protected TSTrain()
.
 Used options (stored within mask of 'TSOpt'):
        0 - Entry is a static one (used for activities)
        1 - Entry is NOT FULLY defined. (*.con not found)
        2 - Entry contains error(s) -- not fully available
  3 to 15 - not used
       16 -
       17 -
       18 -
       19 -
       20 - 'Name'-definition found
       21 - 'Serial'-definition found
       22 - 'MaxVelocity'-definition found
       23 - 'NextWagonUID'-definition found
       24 - 'Durability'-definition found
       25 -
       26 -
       30 - Reserved for temporary usage
       31 - Reserved for temporary usage
 Index-Definitions from 'TSData' (.):
   0.00(S) - Definition of 'MaxVelocity'
   0.01(S) - Definition of 'Durability'
   1.00(I) - Serial-Number of train-definiton
   1.01(I) - UID of next Wagon (NextWagonUID)
   2.00(F) - Maximum speed of train (MaxVelocity)
   2.01(F) - Maximum acceleration of train (MaxVelocity)
=====================================================================
 Constructor: (1) create default-version of instance
=====================================================================
  


TSTrain

protected TSTrain(java.lang.String fn)
.
=====================================================================
 Constructor: (2) create standard-version of instance
=====================================================================
  

Method Detail

chgNme

protected final java.lang.String chgNme(java.lang.String tn)
.
=====================================================================
 Method "chgNme"
 Set new name of train-definition or return current one
 If (tn==null) no changes are performed; current value is returned.
 ##chgNme.TSTrain (Eyecatcher)
=====================================================================
  


crTrn

protected final java.util.Iterator<java.lang.String> crTrn(java.util.ArrayList<java.lang.String> LneT,
                                                           java.lang.String prfx)
.
=====================================================================
 Method "crTrn"
 Create a file-version of the current Train
 ##crTrn.TSTrain (Eyecatcher)
=====================================================================
  


getFile

protected final java.io.File getFile(java.io.File dir)
.
=====================================================================
 Method "getFile"
 Returns current complete file-name as file-definition.
 Suffix is added to create the complete path.
 ##getFile.TSTrain (Eyecatcher)
=====================================================================
  


getName

protected final java.lang.String getName(boolean mde)
.
=====================================================================
 Method "getName"
 Returns current file-name of the object (without suffix)
 If argument equals 'false' the file-name is returned modified to be
   used as a key (lowerCase)
 ##getName.TSTrain (Eyecatcher)
=====================================================================
  


getTObjT

protected final java.util.ArrayList<TSRefC> getTObjT(int c)
.
=====================================================================
 Method "getTObjT"
 Returns current array of 'Train-Object'-References, which is of
   type 'TSRefC'. If it is requested ('c>0'), it is created even if
   it is already available.
 ##getTObjT.TSTrain (Eyecatcher)
=====================================================================
  


getPath

protected static final java.io.File getPath(TSRefC cT,
                                            java.io.File cP)
.
=====================================================================
 Method "getPath"
 Returns file-object denoting path to a engine/waggon
 ##getPath.TSTrain (Eyecatcher)
=====================================================================
  


incCnt

protected final int incCnt(int inc)
.
=====================================================================
 Method "incCnt"
 Increment reference-counter
 (using argument'0', reference-counter may be returned only)
 ##incCnt.TSTrain (Eyecatcher)
=====================================================================
  


toStr

protected final java.lang.String toStr()
.
=====================================================================
 Method "toStr"
 Build a string-representation of all values of this class
 ##toStr.TSTrain (Eyecatcher)
=====================================================================
  

Overrides:
toStr in class TSData