Class RMKeyList

java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList
com.inductiveautomation.rm.base.RMKeyList
All Implemented Interfaces:
Iterable, Collection, List

public class RMKeyList extends AbstractList
A list implementation that tries to get objects from aKey+"Size" or aKey+"Count" and aKey(index), eg., getThingCount(), getThing(index).
  • Constructor Details

    • RMKeyList

      public RMKeyList(Object anObj, String aKey)
      Creates a new key list.
    • RMKeyList

      public RMKeyList(Object anObj, String aKey, String aSubkey)
      Creates a new key list.
  • Method Details

    • size

      public int size()
      Returns the number of objects for key-list key.
      Specified by:
      size in interface Collection
      Specified by:
      size in interface List
      Specified by:
      size in class AbstractCollection
    • get

      public Object get(int anIndex)
      Returns the list element at the given index.
      Specified by:
      get in interface List
      Specified by:
      get in class AbstractList
    • set

      public Object set(int anIndex, Object anObj)
      Resets the object at the given index to given object.
      Specified by:
      set in interface List
      Overrides:
      set in class AbstractList
    • add

      public void add(int anIndex, Object anObj)
      Adds the object at the given index.
      Specified by:
      add in interface List
      Overrides:
      add in class AbstractList
    • remove

      public Object remove(int anIndex)
      Removes the object at the given index.
      Specified by:
      remove in interface List
      Overrides:
      remove in class AbstractList
    • create

      public Object create()
      Creates a new object for this list.