Package jmri.jmrix.loconet.alm
Class LnSimple7thGenDevicesRoutes
- java.lang.Object
-
- jmri.jmrix.loconet.alm.LnSimple7thGenDevicesRoutes
-
public class LnSimple7thGenDevicesRoutes extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description LnSimple7thGenDevicesRoutes()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(LnSimple7thGenDeviceRoutes dr)Add a LnSimple7thGenDeviceRoutes object.LnSimple7thGenDeviceRoutesgetDeviceRoutes(int i)get a LnSimple7thGenDeviceRoutes by its index.LnSimple7thGenDeviceRoutesgetDeviceRoutes(int deviceType, int serNum)Get LnSimple7thGenDeviceRoutes based on devType and serNum, or null.LnSimple7thGenDeviceRoutesgetDeviceRoutes(LnSimple7thGenDeviceRoutes dr)Get LnSimple7thGenDeviceRoutes based on devType and serNum, or null.booleanisDeviceRoutes(int deviceType, int serNum)Report if device is in the list.booleanisDeviceRoutes(LnSimple7thGenDeviceRoutes dr)Report if device is in the list.voidremoveExistingDevice(int devType, int serNum)Remove device.intsize()report the number of devices.
-
-
-
Constructor Detail
-
LnSimple7thGenDevicesRoutes
public LnSimple7thGenDevicesRoutes()
Constructor.
-
-
Method Detail
-
add
public void add(LnSimple7thGenDeviceRoutes dr)
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
public boolean isDeviceRoutes(LnSimple7thGenDeviceRoutes dr)
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
public boolean isDeviceRoutes(int deviceType, int serNum)
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
public LnSimple7thGenDeviceRoutes getDeviceRoutes(int deviceType, int serNum)
Get LnSimple7thGenDeviceRoutes based on devType and serNum, or null.- Parameters:
deviceType- - integerserNum- - integer- Returns:
- LnSimple7thGenDeviceRoutes
-
getDeviceRoutes
public LnSimple7thGenDeviceRoutes getDeviceRoutes(LnSimple7thGenDeviceRoutes dr)
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
public void removeExistingDevice(int devType, int serNum)
Remove device.- Parameters:
devType- - intserNum- - int
-
size
public int size()
report the number of devices.- Returns:
- integer
-
getDeviceRoutes
public LnSimple7thGenDeviceRoutes getDeviceRoutes(int i)
get a LnSimple7thGenDeviceRoutes by its index.- Parameters:
i- - index, 0 thru (size()-1)- Returns:
- LnSimple7thGenDeviceRoutes
-
-