Package jmri.jmrix.loconet.alm
Class LnSimple7thGenDevicesRoutes
java.lang.Object
jmri.jmrix.loconet.alm.LnSimple7thGenDevicesRoutes
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a LnSimple7thGenDeviceRoutes object.getDeviceRoutes(int i) get a LnSimple7thGenDeviceRoutes by its index.getDeviceRoutes(int deviceType, int serNum) Get LnSimple7thGenDeviceRoutes based on devType and serNum, or null.Get LnSimple7thGenDeviceRoutes based on devType and serNum, or null.booleanisDeviceRoutes(int deviceType, int serNum) Report if device is in the list.booleanReport if device is in the list.voidremoveExistingDevice(int devType, int serNum) Remove device.intsize()report the number of devices.
-
Constructor Details
-
LnSimple7thGenDevicesRoutes
public LnSimple7thGenDevicesRoutes()Constructor.
-
-
Method Details
-
add
Add a LnSimple7thGenDeviceRoutes object. When the device (by device type and serial number) is not yet in the devicesRoutes list, a new device is added. When a device (by device type and serial number) exists, that device gets updated.- Parameters:
dr- "DeviceRoutes" to be added
-
isDeviceRoutes
Report if device is in the list. Checks device type and serial number.- Parameters:
dr- LnSimple7thGenDeviceRoutes device- Returns:
- true if the device is in the list, else false
-
isDeviceRoutes
Report if device is in the list. Checks device type and serial number.- Parameters:
deviceType- - integerserNum- - integer- Returns:
- true if the device is in the list, else false
-
getDeviceRoutes
Get LnSimple7thGenDeviceRoutes based on devType and serNum, or null.- Parameters:
deviceType- - integerserNum- - integer- Returns:
- LnSimple7thGenDeviceRoutes
-
getDeviceRoutes
Get LnSimple7thGenDeviceRoutes based on devType and serNum, or null. Data from the dr parameter is ignored except the Device Type and Serial Number.- Parameters:
dr- - LnSimple7thGenDeviceRoutes- Returns:
- LnSimple7thGenDeviceRoutes
-
removeExistingDevice
Remove device.- Parameters:
devType- - intserNum- - int
-
size
report the number of devices.- Returns:
- integer
-
getDeviceRoutes
get a LnSimple7thGenDeviceRoutes by its index.- Parameters:
i- - index, 0 thru (size()-1)- Returns:
- LnSimple7thGenDeviceRoutes
-