Class RollingStockGroup<T extends RollingStock>
java.lang.Object
jmri.beans.PropertyChangeSupport
jmri.jmrit.operations.rollingstock.RollingStockGroup<T>
- Type Parameters:
T- the type of RollingStock in this group
- All Implemented Interfaces:
PropertyChangeFirer,PropertyChangeProvider
A group of rolling stock that is managed as one unit.
-
Field Summary
FieldsFields inherited from class jmri.beans.PropertyChangeSupport
propertyChangeSupport -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class jmri.beans.PropertyChangeSupport
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Field Details
-
_name
-
_lead
-
_group
-
-
Constructor Details
-
RollingStockGroup
-
-
Method Details
-
getName
-
toString
-
add
-
delete
-
getGroup
-
getTotalLength
-
getAdjustedWeightTons
Get a group's adjusted weight- Returns:
- group's weight
-
isLead
-
getLead
-
getSize
Gets the number of rolling stock in this group- Returns:
- number of elements in this group
-
setLead
Sets the lead for this group. RollingStock must be part of the group. The rolling stock that make up this group will have the attributes of the lead. However, the length attribute is the sum of all unit lengths plus the coupler lengths.- Parameters:
rs- lead for this group.
-
removeLead
-
dispose
-