Class LnSimple7thGenDevicesRoutes

java.lang.Object
jmri.jmrix.loconet.alm.LnSimple7thGenDevicesRoutes

public class LnSimple7thGenDevicesRoutes extends Object
  • Constructor Details

  • Method Details

    • 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

      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 - - integer
      serNum - - 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 - - integer
      serNum - - 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

      public void removeExistingDevice(int devType, int serNum)
      Remove device.
      Parameters:
      devType - - int
      serNum - - int
    • size

      public 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