Package com.inductiveautomation.rm.base
Class RMKeyList
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList
com.inductiveautomation.rm.base.RMKeyList
- All Implemented Interfaces:
Iterable
,Collection
,List
A list implementation that tries to get objects from aKey+"Size" or aKey+"Count" and aKey(index), eg.,
getThingCount(), getThing(index).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
An exception class which is thrown when creating a new key-list with invalid object key. -
Field Summary
Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds the object at the given index.create()
Creates a new object for this list.get
(int anIndex) Returns the list element at the given index.remove
(int anIndex) Removes the object at the given index.Resets the object at the given index to given object.int
size()
Returns the number of objects for key-list key.Methods inherited from class java.util.AbstractList
add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subList
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
-
Constructor Details
-
RMKeyList
Creates a new key list. -
RMKeyList
Creates a new key list.
-
-
Method Details
-
size
public int size()Returns the number of objects for key-list key.- Specified by:
size
in interfaceCollection
- Specified by:
size
in interfaceList
- Specified by:
size
in classAbstractCollection
-
get
Returns the list element at the given index.- Specified by:
get
in interfaceList
- Specified by:
get
in classAbstractList
-
set
Resets the object at the given index to given object.- Specified by:
set
in interfaceList
- Overrides:
set
in classAbstractList
-
add
Adds the object at the given index.- Specified by:
add
in interfaceList
- Overrides:
add
in classAbstractList
-
remove
Removes the object at the given index.- Specified by:
remove
in interfaceList
- Overrides:
remove
in classAbstractList
-
create
Creates a new object for this list.
-