From: Bob J. <jac...@us...> - 2002-05-26 06:41:40
|
Update of /cvsroot/jmri/jmri/jmrit/roster In directory usw-pr-cvs1:/tmp/cvs-serv2617 Modified Files: RosterEntry.java Log Message: add copy ctor from another RosterEntry, see JavaDoc for restrictions Index: RosterEntry.java =================================================================== RCS file: /cvsroot/jmri/jmri/jmrit/roster/RosterEntry.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** RosterEntry.java 26 May 2002 00:42:44 -0000 1.2 --- RosterEntry.java 26 May 2002 06:41:37 -0000 1.3 *************** *** 36,39 **** --- 36,58 ---- } + public RosterEntry(RosterEntry pEntry, String pID) { + // The ID is different for this element + _id = pID; + + // The filename is not set here, rather later + _fileName = null; + + // All other items are copied + _roadName = pEntry._roadName; + _roadNumber = pEntry._roadNumber; + _mfg = pEntry._mfg; + _model = pEntry._model; + _dccAddress = pEntry._dccAddress; + _comment = pEntry._comment; + _decoderModel = pEntry._decoderModel; + _decoderFamily = pEntry._decoderFamily; + _decoderComment = pEntry._decoderComment; + } + public void setId(String s) { _id = s; } public String getId() { return _id; } |