|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.jmrit.operations.rollingstock.RollingStockManager
public class RollingStockManager
Base class for rolling stock managers car and engine.
| Field Summary | |
|---|---|
protected Hashtable<String,RollingStock> |
_hashTable
|
protected static int |
BY_BUILT
|
protected static int |
BY_COLOR
|
protected static int |
BY_DESTINATION
|
protected static int |
BY_LOCATION
|
protected static int |
BY_MOVES
|
protected static int |
BY_NUMBER
|
protected static int |
BY_OWNER
|
protected static int |
BY_RFID
|
protected static int |
BY_ROAD
|
protected static int |
BY_TRAIN
|
protected static int |
BY_TYPE
|
protected static int |
BY_VALUE
|
static String |
LISTLENGTH_CHANGED_PROPERTY
|
| Constructor Summary | |
|---|---|
RollingStockManager()
|
|
| Method Summary | |
|---|---|
void |
addPropertyChangeListener(PropertyChangeListener l)
|
void |
deleteAll()
Remove all RollingStock from roster |
void |
deregister(RollingStock rs)
Unload RollingStock. |
void |
dispose()
|
protected void |
firePropertyChange(String p,
Object old,
Object n)
|
List<String> |
getAvailableTrainList(Train train)
Return a list available rolling stock (no assigned train or rolling stock already assigned to this train) on a route, RollingStock is ordered least recently moved to most recently moved. |
List<String> |
getByBuiltList()
Sort by when rolling stock was built |
List<String> |
getByColorList()
Sort by rolling stock color names |
List<String> |
getByDestinationList()
Sort by rolling stock destination |
RollingStock |
getById(String id)
Get rolling stock by id |
List<String> |
getByIdList()
Sort by rolling stock id |
protected List<String> |
getByList(List<String> sortIn,
int attribute)
|
List<String> |
getByLocationList()
Sort by rolling stock location |
List<String> |
getByMovesList()
Sort by rolling stock moves |
List<String> |
getByNumberList()
Sort by rolling stock number, number can alpha numeric |
List<String> |
getByOwnerList()
Sort by rolling stock owner |
RollingStock |
getByRfid(String rfid)
Get a rolling stock by Radio Frequency Identification (RFID) |
List<String> |
getByRfidList()
Sort by rolling stock RFID |
RollingStock |
getByRoadAndNumber(String road,
String number)
Get rolling stock by road and number |
List<String> |
getByRoadNameList()
Sort by rolling stock road name |
List<String> |
getByTrainList()
Sort by rolling stocks in trains |
List<String> |
getByTrainList(Train train)
Get a list of rolling stocks assigned to a train |
RollingStock |
getByTypeAndRoad(String type,
String road)
Get a rolling stock by type and road. |
List<String> |
getByTypeList()
Sort by rolling stock type names |
List<String> |
getByTypeList(String type)
Return rolling stock ids of a specific type |
List<String> |
getByValueList()
Sort by rolling stock value |
int |
getNumEntries()
Get the number of items in the roster |
protected Object |
getRsAttribute(RollingStock rs,
int attribute)
|
void |
register(RollingStock rs)
Load RollingStock. |
void |
removePropertyChangeListener(PropertyChangeListener l)
|
protected List<String> |
sortList(List<String> list)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Hashtable<String,RollingStock> _hashTable
public static final String LISTLENGTH_CHANGED_PROPERTY
protected static final int BY_NUMBER
protected static final int BY_ROAD
protected static final int BY_TYPE
protected static final int BY_COLOR
protected static final int BY_LOCATION
protected static final int BY_DESTINATION
protected static final int BY_TRAIN
protected static final int BY_MOVES
protected static final int BY_BUILT
protected static final int BY_OWNER
protected static final int BY_RFID
protected static final int BY_VALUE
| Constructor Detail |
|---|
public RollingStockManager()
| Method Detail |
|---|
public int getNumEntries()
public void dispose()
public RollingStock getById(String id)
public RollingStock getByRoadAndNumber(String road,
String number)
road - RollingStock roadnumber - RollingStock number
public RollingStock getByTypeAndRoad(String type,
String road)
type - RollingStock type.road - RollingStock road.
public RollingStock getByRfid(String rfid)
rfid - RollingStock's RFID.
public void register(RollingStock rs)
public void deregister(RollingStock rs)
public void deleteAll()
public List<String> getByIdList()
public List<String> getByRoadNameList()
public List<String> getByNumberList()
public List<String> getByTypeList()
public List<String> getByTypeList(String type)
type - type of rolling stock
public List<String> getByColorList()
public List<String> getByLocationList()
public List<String> getByDestinationList()
public List<String> getByTrainList()
public List<String> getByMovesList()
public List<String> getByBuiltList()
public List<String> getByOwnerList()
public List<String> getByValueList()
public List<String> getByRfidList()
protected List<String> getByList(List<String> sortIn,
int attribute)
protected Object getRsAttribute(RollingStock rs,
int attribute)
public List<String> getAvailableTrainList(Train train)
train -
public List<String> getByTrainList(Train train)
train -
protected List<String> sortList(List<String> list)
public void addPropertyChangeListener(PropertyChangeListener l)
public void removePropertyChangeListener(PropertyChangeListener l)
protected void firePropertyChange(String p,
Object old,
Object n)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||