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 classAn 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 TypeMethodDescriptionvoidAdds 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.intsize()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, subListMethods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods 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:
sizein interfaceCollection- Specified by:
sizein interfaceList- Specified by:
sizein classAbstractCollection
-
get
Returns the list element at the given index.- Specified by:
getin interfaceList- Specified by:
getin classAbstractList
-
set
Resets the object at the given index to given object.- Specified by:
setin interfaceList- Overrides:
setin classAbstractList
-
add
Adds the object at the given index.- Specified by:
addin interfaceList- Overrides:
addin classAbstractList
-
remove
Removes the object at the given index.- Specified by:
removein interfaceList- Overrides:
removein classAbstractList
-
create
Creates a new object for this list.
-